[fpc-pascal] Result: string

José Mejuto joshyfun at gmail.com
Mon Mar 4 20:21:08 CET 2013


Hello,

What's the expected output of this code ?

function TheA(): string;
begin
   Result:=Result+'A';
end;

writeln(TheA());

I thought that when the result type is an automated one its value gets 
initialized... Maybe I'm wrong...

-- 




More information about the fpc-pascal mailing list