On 28.08.2010 11:57, Florian Klämpfl wrote:
Am 03.09.2010 21:31, schrieb Sven Barth:
On 03.09.2010 18:02, Marco van de Voort wrote:

Second, does FPC understand "tail recursion"?

Depends on version, do

fpc -i |grep -i tailrec

to find out more.

O.o

Ok... now I'm officially impressed.

Well, simple to implement and useless optimization :)

But it's nice to have.

In the lecture "Introduction of Computer Science 2" we had to learn functional programming with the programming language OCaml. There we used tail recursion a lot (and I always tried to write my functions in a tail recursive form) and it's nice to see/know that FPC can do that as well. :)

Btw: is this a CPU dependent optimization?

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to