[fpc-pascal] fpc isn't optimised for tail recursion, is it?

Jean SUZINEAU jean.suzineau at wanadoo.fr
Mon Jun 12 18:04:07 CEST 2023


According to you other posts, I won't be surprised that you think in a 
C/C++ way.
This doesn't change anything in your last example, but particularly  :

nextt := num;

doesn't behave like in C :

return num;

In pascal I think the equivalent would be :

nextt := num; exit;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230612/7f1e4ce1/attachment.htm>


More information about the fpc-pascal mailing list