1
I have the following code below:
memo1.Lines.Add('def' + ' ' + nome + ' ' + '('+ variavel1 +',' + ' '+ variavel2 + ',' + ' ' + raster1 + ')' +':');
Which results in something like this:
def nome (variavel1, variavel2, raster):
But I would like to optimize the code above. The changes I made were to set the variables aside and use a Array
Variaveis[i] := TEdit(FindComponent('edt_variavel'+IntToStr(i))).text;
Rasters[i] := TEdit(FindComponent('edt_raster'+IntToStr(i))).text;
There is a better way to optimize code instead of leaving it so?
memo1.Lines.Add('def' + ' ' + nome + ' ' + '('+ Variaveis[1] +',' + ' '+ Variaveis[2] + ',' + ' ' + Rasters[1] + ')' +':');
Yes, it is possible, do not use Object pascal/Delphi =D
– Rod
What do you recommend, friend? D
– Guilherme Lima
how about python? perl? c# ? Anyone is better hauhauhaha
– Rod
I am using Delphi to assemble a python equation "formula".. I will consider the idea.
– Guilherme Lima