home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-22 | 278 b | 11 lines | [TEXT/QNTA] |
- ;
- ; This is the source for a simple recursive factorial function
- ; in Quinta. This is already built into the Quinta interpreter.
- ; It illustrates the use of recursion and conditionals.
- ;
-
- [ "n" local n 1 == if then 1 else n n 1 - recurse * endif ]
- "fact" pub integer respond
-
-
-