[fpc-pascal] fpc isn't optimised for tail recursion, is it?
jean.suzineau at wanadoo.fr
Tue Jun 13 15:25:59 CEST 2023
Le 12/06/2023 à 19:05, Steve Litt via fpc-pascal a écrit :
> Busted! I used Pascal 1984-1993
So I guess you are not familiar too with the "Result" variable which
appeared with Delphi 1 in 1995 if I remember correctly.
can be written to as :
I prefer Result because it reduces risks of confusion with recursive call
and you can eventually take the address of Result with @Result (where
@nextt would take the address of the function nextt),
pass it by reference to another function ( e.g. FillChar( Result,
SizeOf(Result), 0); ) ,
it behaves like a normal variable.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal