home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / PLINESYS.ZIP / LABEL.CMD < prev    next >
Encoding:
Text File  |  1991-03-15  |  1.5 KB  |  84 lines

  1. *
  2. * LABEL.CMD
  3. *
  4. * Test the ANYKEY command responses with the GOTO command.  This works
  5. * sort of like a computed goto.  Labels are always converted to lower case
  6. * before they are evaluated so that LB-A is the same thing as lb-a or LB-a
  7. * or Lb-A or any other combination of upper and lower case.
  8. * The user can enter Upper or Lower case as response to the AnyKey Command.
  9. *
  10. *    This is another way to do menus
  11. *
  12.  
  13. OnError Ignore
  14. Label Top
  15.  
  16. *
  17. * Print the Menu
  18. *
  19. Clear
  20. Display
  21.  
  22. Current Time: &TIME Date: &DATE
  23.  
  24.      Enter:
  25.          A - For Option A
  26.          B - For Option B
  27.          C - For Option C
  28.  
  29.  
  30.    Enter A/B/C/ or [Return] to Exit
  31. EndDisplay
  32.  
  33. *
  34. * Get Response (AnyKey uses default prompt)
  35. *
  36. AnyKey Local
  37.  
  38. *
  39. * Enter Option ABC or [Return]
  40. * Branch to Appropriate Function
  41. *
  42. * Note the use of -FOUND on the end of the label so that the ^M is in the
  43. * middle of the label.  ^M is a valid word ending character for PereLine as
  44. * is TAB, SPACE, and ^J so this makes it not be the end of the word.
  45. *
  46. Goto LB-\&LASTKEY
  47.  
  48. *
  49. * Choice A
  50. *
  51. Label LB-A
  52.     AnyKey Local "A - was a good choice"
  53.     Goto Top
  54.  
  55. *
  56. * Choice B
  57. *
  58. Label LB-B
  59.     AnyKey Local "B - was a good choice"
  60.     Goto Top
  61.  
  62. *
  63. * Choice C
  64. *
  65. Label lb-C
  66.     AnyKey Local "C - was a good choice"
  67.     Goto Top
  68.  
  69. *
  70. * [Return] Exit
  71. *
  72. Label LB-^M
  73.     AnyKey Local "Pressed [Return] Exiting ..."
  74.     Clear
  75.     Exit
  76.  
  77. *
  78. * Any Thing Else
  79. *
  80. Label LB-&LASTKEY
  81.     AnyKey Local "Invalid Choice ... Press [Return]"
  82.     Goto Top
  83.  
  84.