home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 026.lha / logo / logo.7 < prev    next >
Text File  |  1987-04-02  |  335b  |  12 lines

  1. ;
  2. ;the following program demonstrates the use of OUTPUT
  3. ;
  4. to factorial :x
  5.    if :x < 2 [output 1] [output (factorial :x-1) * :x]
  6. end
  7. to demo
  8.    print ['   enter ']
  9.    print ['       print [factorial 5] ']
  10.    print ['   to get the factorial of 5.  This procedure uses']
  11.    print ['recursion and the OUTPUT statement to do its work.]
  12. end