Something
public text v1 · immutablefunction Tform1.juroscomposto(ValorCalc, Perc, Parc: String): Real;
var A, B, Valor, Taxa: real;
I: Integer;
begin
Valor := StrToFloat(ValorCalc);
Taxa := StrToFloat(Perc);
for I :=1 to StrToInt(Parc) do
begin
if A = 0 then
begin
A := power(valor*(1+(Taxa/100)),1);
result := A;
end
else if B = 0 then
begin
B := power(A*(1+(Taxa/100)),1);
Result := B;
end
else
begin
B := power(B*(1+(Taxa/100)),1);
result := B;
end;
end;
end;