home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / menu / mman.tst < prev    next >
Encoding:
Text File  |  1988-05-03  |  3.4 KB  |  97 lines

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --sampmen1.mne
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4.  
  5.    *  This is Sample Menu 1 delivered with the Menu Manager. This
  6.    *  Menu calls a "Task", a "Program" and an Ada procedure followed
  7.    *  by a call to another menu.
  8.  
  9.          [ sam1 ]    * Will create a Menu Definition Table called
  10.                 *  "sam1"
  11.  
  12.  
  13.   Line[2] Col[1]
  14.       [  This is the Sample Menu 1, it is used to demonstrate the Menu Manager.]
  15.    l[4]
  16.       [ The selections available are:]
  17.    l[7] col[10]
  18.         [ 'a' to start the task 'ABDCE']
  19.    l[9]
  20.                 [ 'b' to start the program 'XYZ' ]
  21.    l[11]
  22.                 [ 'c' to start Ada procedure SAMPLE_1, and bring up menu 'sam2']
  23.  
  24.         Error_line_is [  That selection is bad, try again ]
  25.  
  26. S [ a ]    Task [  ABCDE  ]
  27.  
  28. Select [ b ]    program [ XYZ ]
  29.  
  30.     Select [c] Ada [ SAMPLE_1 ]    Menu [ sam2 ]
  31. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  32. --sampmen2.mne
  33. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  34.  
  35.  
  36.  
  37. [sam2];Error[ Wrong selection, try again ]
  38.  
  39.     *  This the Sample Menu 2 delivered with the Menu Manager. This
  40.         *  menu includes selection commands that only call the other menus,
  41.         *  no programs, tasks or Ada procedures are called in this menu.
  42.  
  43.     Select [ 1 ] Menu [ sam1 ]
  44.  
  45.         Sel [3]        Menu_def_table [sam3]
  46.  
  47.    Line [5]   Column [6] 
  48. [This menu is the Sample Menu 2 delivered to demonstrate the Menu Manager.]
  49.    Line [8]
  50. [The menu is used to select the other menus. The selections include:]
  51.    Line_number [10] Col[15]
  52. [type "1" to display menu "sam1"]
  53.    Lin[11]
  54. [type "3" to display menu "sam3"]
  55.  
  56.     *** End of sampmen2.mne, Menu Def Table sam2 ****
  57. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  58. --sampmen3.mne
  59. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  60.  
  61.  
  62.     * This is Sample Menu 3 delivered with the Menu Manager for 
  63.         * demonstration. This menu will contain to selections that
  64.         * call the Ada procedure followed by displaying each of the
  65.         * other sample menus. The 3 selection will contain a slight
  66.         * syntax error. This will demonstrate how the compiler produces
  67.         * a Men Def Table even if Warning type errors are found. The
  68.         * resulting action of the Menu should be examined by the user.
  69.  
  70. [sam3],Error[opps...]
  71.  
  72. L[4]
  73. [This is Sample Menu 3 delivered to the user. The Men Definition File for]
  74. L[5]
  75. [this Menu contains some syntax errors, however a Menu Definition Table is]
  76. L[6]
  77. [still created, and the action of the resulting menu should be noted.]
  78. l[9] Column [5]
  79. [The '%' will call the Ada procedure "SAMPLE_1" followed by menu "sam1"]
  80. l[10]
  81. [The '#' will call the Ada procedure followed by menu "sam3"  * note the Line
  82.     * has no closing delimiter.
  83.     [ sample text]
  84. l[12]
  85. [The '$' will call the Ada procedure followed by displaying menu "sam2"]
  86.  
  87.  Select [ % ] Ada [SAMPLE_1]    Menu [sam1]
  88.  Select [ # ]    Ada [SAMPLE_1]    Menu [sam3]
  89.  Sel    [ $ ] Ada [SAMPLE_1] Menu [sam2]
  90.  
  91. l[15]
  92. col [2] [Note that although the line defining selection '#' is not displayed]
  93. l[16]   [the selection key still works. This is because the syntax error was]
  94. l[17]   [found in the line to be put to the Menu Layout, and no error was   ]
  95. l[18]   [found in the Select command identifying the '#' character.]
  96.  
  97.