I have the following code below:
memo1.Lines.Add('def' + ' ' + nome + ' ' + '('+ variavel1 +',' + ' '+ variavel2 + ',' + ' ' + raster1 + ')' +':');
That 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 leave the variables aside and use an Array
Variaveis[i] := TEdit(FindComponent('edt_variavel'+IntToStr(i))).text;
Rasters[i] := TEdit(FindComponent('edt_raster'+IntToStr(i))).text;
Is there a better way to optimize code instead of leaving it like this?
memo1.Lines.Add('def' + ' ' + nome + ' ' + '('+ Variaveis[1] +',' + ' '+ Variaveis[2] + ',' + ' ' + Rasters[1] + ')' +':');