home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rpos2101.zip / RECURSE.P < prev    next >
Text File  |  1998-06-05  |  652b  |  34 lines

  1. R: recures.p - an example of a recursive PILOT program
  2.  : Written by Rob Linwood (auntfloyd@biosys.net)
  3.  
  4. R: Ask a question
  5.  
  6. T: Would you like to recurse again? (Y/N)
  7.  
  8. R: Get the answer and put it in $answer,
  9.  : because no variable name was given
  10.  
  11. A:
  12.  
  13. R: Try to match any of the strings listed after the "M:"
  14.  
  15. M: y yes sure yep
  16.  
  17. R: If any of them matched, then #matched was set to 1
  18.  : Next we Jump to "*recurse" if #matched equals 1
  19.  
  20. JY: recurse
  21.  
  22. R: If nothing matched, we end the program
  23.  
  24. E:
  25.  
  26. R: Define a label called "recurse"
  27.  
  28. *recurse
  29.  
  30. R: Call rpilot again, and start running this file again
  31.  
  32. S: rpilot recurse.p
  33.  
  34.