Files
harbour-core/tests/recursiv.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

17 lines
212 B
Plaintext

// testing recursive calls
PROCEDURE Main()
? "Testing recursive calls"
?
? f( 10 )
? 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1
RETURN
FUNCTION f( a )
RETURN iif( a < 2, 1, a * f( a - 1 ) )