home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / progrmng / quinta.sit / fact.q next >
Encoding:
Text File  |  1990-03-22  |  278 b   |  11 lines  |  [TEXT/QNTA]

  1. ;
  2. ; This is the source for a simple recursive factorial function
  3. ; in Quinta.  This is already built into the Quinta interpreter.
  4. ; It illustrates the use of recursion and conditionals.
  5. ;
  6.  
  7. [ "n" local n 1 == if then 1 else n n 1 - recurse * endif ]
  8. "fact" pub integer respond
  9.  
  10.  
  11.