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

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --man.txt
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4.  
  5.                                                             Drawing  A14589
  6.                                                             April 17, 1985
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                             Ada Menu Manager Users Guide
  20.  
  21.  
  22.                               Contract N66001-85-C-0035
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                           For the Naval Ocean System Center
  34.  
  35.  
  36.                                 San Diego, California
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.           Ford Aerospace and
  67.           Communication Corp.
  68.  
  69.  
  70.  
  71.                                                             Drawing  A14589
  72.                                                             April 17, 1985
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.                                 Approval for Release
  86.  
  87.  
  88.  
  89.  
  90.  
  91.                    -----------------------------------------------
  92.                                K. Lamarche,  Engineer
  93.                            Ada Menu Handler Project (NOSC)
  94.  
  95.  
  96.  
  97.  
  98.  
  99.                    -----------------------------------------------
  100.                                J. Roberts,  Supervisor
  101.                           Range Programs  S/W  Development
  102.  
  103.  
  104.  
  105.  
  106.  
  107.                    -----------------------------------------------
  108.                                 D. McKinney,  Manager
  109.                                 Software Engineering
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.           Ford Aerospace and
  133.           Communication Corp.
  134.  
  135.  
  136.  
  137.                                                             Drawing  A14589
  138.                                                             April 17, 1985
  139.  
  140.  
  141.           1.  _O_v_e_r_v_i_e_w
  142.  
  143.                The purpose of the Menu Manager is to provide a tool to make
  144.           and use menus as designed by a user. This enables users of a
  145.           software system to select desired system operations from a
  146.           display menu by typing a single selection key. The Menu Manager
  147.           is written in Ada. Procedures must be supplied by the user to
  148.           interface between the Ada environment and the command line inter-
  149.           preter since each Ada environment and operating system may have a
  150.           different method of providing this capability.
  151.  
  152.                The Menu Manager consists of two main programs: a Menu Com-
  153.           piler and a Menu Handler. Menus are created in the Menu Defini-
  154.           tion Language using a standard editor. The resulting Menu Defini-
  155.           tion file is then compiled into a non-readable Menu Definition
  156.           Table. The tables are input to the Menu Handler to produce termi-
  157.           nal displays, and to respond to user selections.
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.           Ford Aerospace and              1
  199.           Communication Corp.
  200.  
  201.  
  202.  
  203.                                                             Drawing  A14589
  204.                                                             April 17, 1985
  205.  
  206.  
  207.                 Table 1 Diagram of the Menu Manager
  208.  
  209.                                   operating system
  210.                                          | |
  211.                                          | |
  212.                                           |
  213.                                  Menu Definition File
  214.                                   ------------------
  215.                                  | written in Menu  |
  216.                                  |   Definition     |
  217.                                  |    Language      |
  218.                                   ------------------
  219.                                          | |
  220.                                          | |
  221.                                           |
  222.                                   ------------------
  223.                                  |  Menu Compiler   |
  224.                                   ------------------
  225.                                          | |
  226.                                          | |
  227.                                           |
  228.                                   ------------------
  229.                                  |   Non-readable   |
  230.                                  | Menu Definition  |
  231.                                  |     Table        |
  232.                                   ------------------
  233.                                          | |
  234.                                          | |
  235.                                           |
  236.                                   ------------------
  237.                                  |   Menu Handler   |
  238.                                   ------------------
  239.                                          | |
  240.                                          | |
  241.                                           |
  242.                                   ------------------
  243.                                  | Terminal Display |
  244.                                  |   Response to    |
  245.                                  |  User Selection  |
  246.                                   ------------------
  247.  
  248.                The design objectives can be divided into user related
  249.           objectives and software product objectives.
  250.  
  251.           1.1  _U_s_e_r__R_e_l_a_t_e_d__O_b_j_e_c_t_i_v_e_s
  252.  
  253.            A.  Control Option Flexibility
  254.                The options provided include selection of independent pro-
  255.                grams to execute serially with the Menu Handler, selection
  256.                of tasks to execute concurrently with the Menu Handler, and
  257.                selection of any other previously defined menu. The confi-
  258.                guration file (Mencon) included with this package provides
  259.                the option of changing the default values assigned to
  260.  
  261.  
  262.  
  263.  
  264.           Ford Aerospace and              2
  265.           Communication Corp.
  266.  
  267.  
  268.  
  269.                                                             Drawing  A14589
  270.                                                             April 17, 1985
  271.  
  272.  
  273.                maximum file name length, screen length, the length of lines
  274.                within a Menu Definition file, the menu quit character, and
  275.                the screen width. By editing the configuration file, the
  276.                user can tailor the Menu Manager to fit the needs of a par-
  277.                ticular operating system.
  278.  
  279.            B.  Menu Networks
  280.                One menu may be accessed by another menu by being included
  281.                as a selection in the menu. The menus may be organized into
  282.                a standard tree type structure, or into any other type of
  283.                network.
  284.  
  285.            C.  Menu Modification
  286.                New menus can be created or existing menus modified at any
  287.                time. The Menu Definition Language is simple and easily
  288.                learned. The Menu Compiler checks for syntax and logic
  289.                errors in the Menu Definition file. The menus are easy to
  290.                change as resources are added to or deleted from a system.
  291.  
  292.            D.  Ada Procedure Calls
  293.                The menus can also be used to select internal Ada procedures
  294.                when the Menu Manager is compiled as part of a larger Ada
  295.                program. The calls to the internal procedure must be entered
  296.                into the package body of the unit named Process_Initiator.
  297.                The Process_Initiator body is contained in the files
  298.                Proctord.ada and Proctore.  ada. To use this option, the Ada
  299.                procedures must be linked to the main Menu Handler program
  300.                Menushow. The Menu Handler code must be re-compiled for
  301.                every such change.
  302.  
  303.           1.2  _S_o_f_t_w_a_r_e__P_r_o_d_u_c_t__O_b_j_e_c_t_i_v_e_s
  304.  
  305.            A.  Portability
  306.                The Ada code in the Menu Manager has been designed to be as
  307.                reusable as possible. The initial version is built for use
  308.                under the AOS (Advanced Operating System) operating system
  309.                on the Data General 4,000 and 10,000 computers, but system-
  310.                dependent and terminal interfaces are as general as possible
  311.                to facilitate porting to other operating systems.
  312.  
  313.            B.  Ada Style
  314.                The Ada code in the Menu Manager was designed to take advan-
  315.                tage of the special structures available in the Ada
  316.                language. The main functional procedure and data structure
  317.                groupings are contained in separate packages, some of which
  318.                are used by both the Menu Compiler and Menu  Handler. The
  319.                data typing facilities of Ada are used to create specialized
  320.                data structures wherever appropriate.  A dynamic string
  321.                function is also utilized in these programs.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.           Ford Aerospace and              3
  331.           Communication Corp.
  332.  
  333.  
  334.  
  335.                                                             Drawing  A14589
  336.                                                             April 17, 1985
  337.  
  338.  
  339.           1.3  _U_s_i_n_g__t_h_e__M_e_n_u__C_o_m_p_i_l_e_r
  340.  
  341.                The Menu Compiler is used to process the Menu Definition
  342.           file written by the user in the Menu Definition Language. If no
  343.           disabling or fatal errors occur during compilation, a Menu Defin-
  344.           ition Table is created. As the compiler analyzes the Menu Defini-
  345.           tion file, messages are displayed on the users terminal. The mes-
  346.           sages alert the user when a syntax error is found, and when the
  347.           compiler has completed. The messages are sent to the standard
  348.           system output, generally the terminal where the Menu Compiler has
  349.           executed. The messages are not currently sent to a file or hard
  350.           copy printer, so the user will have to stop and start the display
  351.           scrolling if many messages are displayed. A message displayed for
  352.           a syntax error includes the following:
  353.  
  354.                           The code number for the error.
  355.                           The line number in the Menu Definition file where
  356.                              the error was found.
  357.                           The severity of the syntax error.
  358.                           The explanation of the error.
  359.  
  360.                The possible errors that may be invoked are discussed in
  361.           more detail in Section V, Ada Package Descriptions.
  362.  
  363.                In most cases, a syntax error will not terminate compilation
  364.           or creation of a Menu Definition Table. The Menu Definition Table
  365.           that has been compiled with errors may still be used as a menu.
  366.           The resulting menu may not appear on the display as expected, and
  367.           its reaction to user input may also not be as expected. A sample
  368.           menu with such errors is provided in Appendix 2 as an example of
  369.           what can happen to a menu compiled with errors.
  370.  
  371.                The final message delivered to the users terminal will indi-
  372.           cate the total number of errors found in this compilation. It
  373.           will also indicate the total severity of these errors, which is
  374.           the highest severity of any error found. If the Menu Definition
  375.           File was fully compiled and the Menu Definition Table was created
  376.           successfully, the compiler will terminate with a message to that
  377.           effect.
  378.  
  379.           1.4  _U_s_i_n_g__t_h_e__M_e_n_u__H_a_n_d_l_e_r
  380.  
  381.                The Menu Handler uses the Menu Definition Table created by
  382.           the compiler and produces a menu. The menu includes both the ter-
  383.           minal display and the processing of user inputs. The display and
  384.           processing produced by user input are almost totally defined in
  385.           the Menu Definition File, and the values present in the confi-
  386.           guration file Mencon. The Menu Definition File is described in
  387.           Section III. The configuration file Mencon is described in Sec-
  388.           tion II. The following describes the features that all menus have
  389.           in common.
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.           Ford Aerospace and              4
  397.           Communication Corp.
  398.  
  399.  
  400.  
  401.                                                             Drawing  A14589
  402.                                                             April 17, 1985
  403.  
  404.  
  405.                When a menu is run by the Menu Handler, it waits for a sin-
  406.           gle character of user input. The character ! is reserved as an
  407.           escape character and may not be used for user defined input.
  408.           After typing a !, the user can enter a full line of text. The
  409.           text line typed (minus the !) will be passed to the
  410.           Process_Initiator unit. The Process_Initiator unit will attempt
  411.           to pass the line to the command line interpreter of the operating
  412.           system. If the capability of interfacing between the Ada environ-
  413.           ment and the command line interpreter does not exist, this option
  414.           will not be available.
  415.  
  416.                The last line of the menu display is always reserved for the
  417.           ==>> prompt. This signals the user that the Menu Handler is wait-
  418.           ing for input. The line above the prompt is called the Menu
  419.           Information line. This line may display a message from the Menu
  420.           Handler when the screen is refreshed. If erroneous key input is
  421.           entered, the bad selection message from the Menu Definition file
  422.           will be displayed.  When a background task is passed to the com-
  423.           mand line interpreter, the Menu Information line will display a
  424.           message to that effect. When the Menu Definition file is created,
  425.           the user should not use the last two lines as they are reserved
  426.           for the prompt and the Menu Information line.
  427.  
  428.                The Menu display is refreshed on every user input. The
  429.           current software uses simple I/O (input / output) instructions to
  430.           implement this. The display consists of lines passed sequentially
  431.           to the screen.  If more sophisticated display techniques are
  432.           desired the Ada program code will have to be altered.
  433.  
  434.                Messages are displayed to the user when the Menu Handler is
  435.           being run. These messages alert the user that a file was not
  436.           found, that a menu was not correctly configured for the current
  437.           run of the Menu Handler, or that a process line was not correctly
  438.           interpreted by the command line interpreter. The message is
  439.           displayed and the Menu Handler waits until the user hits a key
  440.           before returning to the menu display.
  441.  
  442.                A quit character is used to exit the Menu Handler program.
  443.           The quit character is defined in the configuration file (Mencon).
  444.           The character may be used as a selection key in the Menu Defini-
  445.           tion file, but the quit character will have precedence. If that
  446.           character is typed as a menu selection, the Menu Handler will
  447.           terminate before any attempt is made to process the selection.
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.           Ford Aerospace and              5
  463.           Communication Corp.
  464.  
  465.  
  466.  
  467.                                                             Drawing  A14589
  468.                                                             April 17, 1985
  469.  
  470.  
  471.           2.  _D_e_s_c_r_i_p_t_i_o_n__o_f__t_h_e__C_o_n_f_i_g_u_r_a_t_i_o_n__F_i_l_e__(_M_e_n_c_o_n_)
  472.  
  473.                Mencon is the configuration file that contains the user
  474.           defined items. The user defined items are the maximum file name
  475.           length, the Menu Compiler input file name, the maximum number of
  476.           characters per line in the Menu Compiler input file, the Menu
  477.           Handler input file name, the screen width and the menu quit char-
  478.           acter. This file can be edited by the user so so the values it
  479.           contains will be compatable with a particular operating system.
  480.           For example, many operating systems do not allow file names
  481.           longer than eight characters. If a particular operating does
  482.           allow file names longer than eight characters, the value of the
  483.           maximum length allowed for a file name can be changed to reflect
  484.           this fact. Any of the values given for the user defined items can
  485.           be modified to cater to the needs of an operating system.  The
  486.           Menu Manager programs do not have to be re-compiled when the
  487.           values in the Mencon file are changed. However, menus compiled
  488.           with one configuration should be run with the same configuration.
  489.           Otherwise an error will result when the Menu Handler trys to
  490.           access the Menu Definition Table and the menu will not be pro-
  491.           cessed. If nonsense values are entered, the Ada package
  492.           Process_Configuration will substitute reasonable default values
  493.           for those items. This insures that the Menu Manager programs will
  494.           still perform. Table 2 illustrates the configuration file and the
  495.           default values provided.
  496.  
  497.             ----------------------------------------------------------------
  498.           | Mencon - Menu Manager Configuration File                         |
  499.           | Maximum length allowed for a file name in this operating system: |
  500.           | 15                                                               |
  501.           | File where the Menu Compiler will always get its input:          |
  502.           | MENUFILE                                                         |
  503.           | Maximum characters per line in the Menu Compiler input file:     |
  504.           | 100                                                              |
  505.           | File where the Menu Handler will always get its input:           |
  506.           | MENUTABL                                                         |
  507.           | Screen width                                                     |
  508.           | 80                                                               |
  509.           | Screen length                                                    |
  510.           | 22                                                               |
  511.           | Character used to exit the Menu Handler                          |
  512.           | @                                                                |
  513.             -----------------------------------------------------------------
  514.  
  515.  
  516.                                        Table 2
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.           Ford Aerospace and              6
  529.           Communication Corp.
  530.  
  531.  
  532.  
  533.                                                             Drawing  A14589
  534.                                                             April 17, 1985
  535.  
  536.  
  537.           3.  _D_e_s_c_r_i_p_t_i_o_n__o_f__t_h_e__P_r_o_c_e_s_s___I_n_i_t_i_a_t_o_r__A_d_a__P_a_c_k_a_g_e
  538.  
  539.                A primary concern of installation of the Menu Manager is
  540.           providing a method to access the command line interpreter from
  541.           the Ada environment, and to access other Ada procedures that are
  542.           not part of the Menu Manager software. It is not possible to
  543.           deliver a procedure that accomplishes this since 1) this goes
  544.           beyond the scope of the Ada language, and 2) the Menu Manager may
  545.           be used on different operating systems with different command
  546.           line interpreters.
  547.  
  548.                What has been delivered is an Ada package that contains a
  549.           procedure with a basically null procedure body. The package unit
  550.           name is Process_Initiator, and the procedure in this package is
  551.           Command_Line_Processor. The code for the package body is in
  552.           Appendix 5, Source Code. The procedure provides a link to the
  553.           Menu Handler program. The Menu Handler program calls this pro-
  554.           cedure and passes it the actual parameters shown. The installer
  555.           of the Menu Manager must determine if an Ada procedure is avail-
  556.           able to pass a character string to the command line interpreter.
  557.           This procedure must be specified and called within the
  558.           Command_Line_Processor procedure.  The code provides further
  559.           explanation on what object contains the character string, and
  560.           other parameters that are passed to and from the Menu Handler.
  561.           Without the capability to issue a line to the command line inter-
  562.           preter, the Menu Handler cannot call software external to the Ada
  563.           environment and will be limited to calling Ada procedures.
  564.  
  565.                The ability to call user defined Ada procedures will also
  566.           require that the user provide some interface to the Menu Handler.
  567.           The Menu Handler receives procedure names as character strings.
  568.           However, the procedure call statements cannot be created at run
  569.           time because the procedure may not have been linked to the Menu
  570.           Handler. Another procedure within the Process_Initiator package
  571.           is used as the interface for user defined Ada procedures. The
  572.           procedure is named Ada_Procedure_Call. The body of the procedure
  573.           will consist mainly of a multi-conditional statement, where a
  574.           condition exists for each Ada procedure that may be called. Each
  575.           condition will test if the character string passed to
  576.           Ada_Procedure_Call matches an Ada procedure name. If this condi-
  577.           tion is true the procedure will be called.
  578.  
  579.                Any procedure called by Ada_Procedure_Call must be linked in
  580.           some way to the Process_Initiator package. There are three
  581.           methods of doing this described in the code. The code also
  582.           describes the other parameters passed to and from the Menu
  583.           Handler and the Ada_Procedure_Call procedure.
  584.  
  585.                Any changes made to the Process_Initiator package body will
  586.           require re-compilation of the body. The main procedure (Menushow)
  587.           will at least have to be re-linked. In some Ada environments, the
  588.           main procedure may have to be re-compiled and then re-linked.
  589.  
  590.  
  591.  
  592.  
  593.  
  594.           Ford Aerospace and              7
  595.           Communication Corp.
  596.  
  597.  
  598.  
  599.                                                             Drawing  A14589
  600.                                                             April 17, 1985
  601.  
  602.  
  603.           4.  _M_e_n_u__D_e_f_i_n_i_t_i_o_n__L_a_n_g_u_a_g_e__S_y_n_t_a_x
  604.  
  605.           4.1  _I_n_t_r_o_d_u_c_t_i_o_n
  606.  
  607.                This  section  defines  the syntax used  in  the  Menu
  608.           Definition Language. The files created using this language will
  609.           be processed by  the  Menu  Compiler  to  create  table  files,
  610.           called  Menu Definition Tables, containing information used at
  611.           run time by the Menu Handler.
  612.  
  613.                When  creating  a menu,  the menu designer must make  some
  614.           basic decisions:
  615.  
  616.              - What selection keys will be available to the menu user,
  617.  
  618.              - What action will occur when any of these selections is made,
  619.  
  620.              - What the menu display will look like, ie. what text will be
  621.                shown to describe the selection choices to the menu user.
  622.  
  623.                The Menu Definition Language is used to set these charac-
  624.           teristics of the menu. The menu designer uses a series of
  625.           instructions with desired qualifiers, to produce a menu with the
  626.           specific selection choices, action invoked, and display appear-
  627.           ance desired.
  628.  
  629.                The  description  of the Menu Definition Language starts
  630.           with  a description of lexical units,  which are the building
  631.           blocks  for the  lines  of  the Menu Definition File.  Part  III
  632.           contains  a general   description  of  the  Menu  Definition
  633.           File  and   the instruction  format.  Part IV describes the
  634.           details and syntax of the instructions used.
  635.  
  636.           4.2  _D_e_f_i_n_i_t_i_o_n__o_f__B_a_s_i_c__L_e_x_i_c_a_l__U_n_i_t_s
  637.  
  638.                In describing the Menu Definition Language syntax,  the fol-
  639.           lowing lexical units will be referred to:
  640.  
  641.           4.2.1  _R_e_s_e_r_v_e_d__I_d_e_n_t_i_f_i_e_r
  642.  
  643.                These  are  character strings with specific meaning to  the
  644.           Menu Compiler.  The  software  keys  only on the  first  charac-
  645.           ter  of Reserved_Identifiers, therefore the user has great free-
  646.           dom to use desired  words.  For  example,  one
  647.           Reserved_Identifier  is  the character  string "SELECTION",  for
  648.           which the user can write  any string   that  begins  with  the
  649.           letter  'S'  and  contains   no Word_Separators (described
  650.           below). The following strings would be interpreted  by  the Table
  651.           Generation Software as  a  "SELECTION"
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.           Ford Aerospace and              8
  661.           Communication Corp.
  662.  
  663.  
  664.  
  665.                                                             Drawing  A14589
  666.                                                             April 17, 1985
  667.  
  668.  
  669.           Reserved_Identifier:
  670.                     "SELECTION"    "Select"  "S"  "Slctn"
  671.           BN notation
  672.                Reserved_Identifier ::= Control_Identifier|
  673.                                         Action_Identifier|
  674.                                         Comment_Identifier
  675.  
  676.           4.2.2  _C_o_n_t_r_o_l__I_d_e_n_t_i_f_i_e_r
  677.  
  678.                These  strings are a subset of the  Reserved_Identifiers.
  679.           Within the Menu Definition File,  they specify what "type" of
  680.           definition is  desired,  ie specifying a selection key and its
  681.           corresponding action, or specifying the error message to appear
  682.           should the menu user type an invalid entry. Since the
  683.           Control_Identifiers are all Reserved_Identifiers,  only  the
  684.           first letter is  significant  as described above.
  685.  
  686.           BN notation
  687.                Control_Identifier ::= Control_Character{character other
  688.                                         than Word_Separators}
  689.                Control_Character ::= E|S|L|C
  690.  
  691.           4.2.3  _A_c_t_i_o_n__I_d_e_n_t_i_f_i_e_r
  692.  
  693.                These  are  character  strings  that specify  the  action
  694.           to  be performed  when a selection is made from the menu being
  695.           defined. They are also a subset of the Reserved_Identifiers,  and
  696.           only the first character is significant.
  697.  
  698.           BN notation
  699.                Action_Identifier ::= Action_Character{characters other than
  700.                                         Word_Separators}
  701.                Action_Character ::= M|P|T|A
  702.  
  703.           4.2.4  _W_o_r_d__S_e_p_a_r_a_t_o_r
  704.  
  705.                These  are  character  strings  that are  used  to  separate
  706.           the entities of the Menu Definition File. Word_Separators are any
  707.           one or a combination of the following characters:
  708.  
  709.                ':'    ','     ' '(blank)     '<CR>'    '<TAB>'    ';'
  710.           BN notation
  711.                Word_Separator ::= Word_Separator_Char{Word_Separator_Char}
  712.                Word_Separator_Char ::= :|,| |<CR>|<TAB>|;
  713.  
  714.           4.2.5  _U_s_e_r__E_n_t_r_y
  715.  
  716.                These  are user determined character strings,  always
  717.           enclosed in the  delimiters "[ ]".  The string within the delim-
  718.           iters  defines program,  task,  and  menu names,  line number and
  719.           column  number values,  display  text,  and desired error mes-
  720.           sages.  The  string within the delimiters can contain any charac-
  721.           ters,  however if the right  delimiter  character  is  desired
  722.  
  723.  
  724.  
  725.  
  726.           Ford Aerospace and              9
  727.           Communication Corp.
  728.  
  729.  
  730.  
  731.                                                             Drawing  A14589
  732.                                                             April 17, 1985
  733.  
  734.  
  735.           within  the  string,  2 consecutive  right  delimiter  characters
  736.           must  be  used.   Some examples of User_Entries:
  737.  
  738.                [SYSTEM.TXT]   [  Pick again, that is not valid  ]
  739.                [  [341,106]]systat.mac  ;  3  ]
  740.           BN notation
  741.                User_Entry ::= Left_Delimiter{any character other than
  742.                                              Right_Delimiter  |
  743.                                    Right_Delimiter Right_Delimiter}
  744.                                                        Right_Delimiter
  745.                Left_Delimiter ::= [
  746.                Right_Delimiter ::= ]
  747.  
  748.           4.2.6  _C_o_m_m_e_n_t
  749.  
  750.                The Comment,  signified by a Comment_Identifier,  makes the
  751.           Menu Compiler  ignore  all characters following until the end  of
  752.           the line. Examples of Comments:
  753.  
  754.             *  This is a Comment line....
  755.             SELECTION [4], PROGRAM [SAMPLE]  *This comment follows code
  756.           BN notation
  757.                Comment ::= Comment_Identifier{any character string}<CR>
  758.                Comment_Identifier ::= *
  759.  
  760.           4.3  _S_t_r_u_c_t_u_r_e__o_f__M_e_n_u__D_e_f_i_n_i_t_i_o_n__F_i_l_e
  761.  
  762.                The  Menu  Definition  File  contains lines  of  text  which
  763.           are processed by the Menu Compiler.  All blank lines are ignored.
  764.           The Menu Definition contains two sections, the Title is always
  765.           first, followed by the Body.
  766.  
  767.                The  Title  section  is  simply  one  line  containing  a
  768.           single User_Entry. The delimited character string in the
  769.           User_Entry is a file  name,  8  characters or less,  the first
  770.           character being  a letter,  and no embedded blanks or special
  771.           characters except  the underscore   '_'.   This   file   name
  772.           will  be   the   external identification of the resulting Menu
  773.           Description.  Later we  will see how a menu can be made to call
  774.           another menu,  using the Title name  for that call.  The Menu
  775.           Compiler creates a Menu Definition Table from the Menu Descrip-
  776.           tion File.  This table file will  have the  name  specified  in
  777.           the Title.  Blanks  before  and  after the Title  name  are
  778.           ignored. Example of Title lines:
  779.  
  780.                       [ MenuA ]
  781.  
  782.                The  Menu  Compiler  will  create  a  table  file  from  the
  783.           subsequent  Menu  Description.  The  table file  will  be  called
  784.           "MenuA".  Other examples:
  785.  
  786.                     [  M1_SAMPLS  ]
  787.                     [A]
  788.  
  789.  
  790.  
  791.  
  792.           Ford Aerospace and             10
  793.           Communication Corp.
  794.  
  795.  
  796.  
  797.                                                             Drawing  A14589
  798.                                                             April 17, 1985
  799.  
  800.  
  801.                The  Body  section of the Menu Description contains a
  802.           series  of "definition  instructions".   Each  instruction  con-
  803.           sists  of   a Control_Identifier   followed   by
  804.           Reserved_Identifiers   and/or User_Entries  which  qualify  what
  805.           is  desired.  More  than  one instruction can be put on a line,
  806.           but they must be separated  by Word_Separators,  and  the  syntax
  807.           of each instruction  must  be correct. An example of an instruc-
  808.           tion is shown below:
  809.  
  810.                   Control_    Reserved_Identifiers and User_
  811.                  Identifier   Identifiers to qualify action
  812.                     __|___  _______________|_______________
  813.                     |    |  |     |      |       |        |
  814.                     SELECT:[4], PROG [FILEFIX], MENU [FILESEL]
  815.                     |________________________________________|
  816.                                         |
  817.                               Full Instruction
  818.  
  819.           The use of each Control_Identifier is shown in the next section.
  820.  
  821.           4.4  _I_n_s_t_r_u_c_t_i_o_n_s__a_n_d__U_s_e__o_f__C_o_n_t_r_o_l___I_d_e_n_t_i_f_i_e_r_s
  822.  
  823.                The   following  defines  the  use  of  the
  824.           Control_Identifiers available.    Remember    that   all
  825.           Control_Identifiers    are Reserved_Identifiers  and  that  only
  826.           the  first  character   is significant.  Any  string  starting
  827.           with the same letter  as  the Control_Identifier  can  be  used
  828.           to perform the stated  type  of instruction.  See  section  II
  829.           for  more  detail.  The  following descriptions  refer  to the
  830.           names of lexical units  described  in section II. Refer to sec-
  831.           tion II as needed for more details.
  832.  
  833.           4.4.1  _E_r_r_o_r__l_i_n_e  The  Error_line  Control_Identifier  is  used
  834.           to  indicate  what character  string should be displayed should
  835.           the menu user make a selection  that  is  not defined.  The  form
  836.           for  an  Error_line instruction is:
  837.  
  838.                The   Control_Identifier,   Error_line  ,   followed  by   a
  839.           Word_Separator,  followed  by  a User_Entry where  the  character
  840.           string is the line output on an invalid menu selection.  Examples
  841.           of Error_line instructions:
  842.  
  843.                E,[Improper Selection, Try Again]
  844.                Err [ Err, [Improper Choice]] ]
  845.                E_line   []    * No error line on bad selection
  846.  
  847.                Only  one  error line will be used when the menu is  running
  848.           and receives bad selections.  The last Error_line defined in the
  849.           Menu Definition will be used when the menu runs. The error line
  850.           can be up  to  the maximum column number of characters  long,
  851.           and  will always  appear on a predesignated line on the menu
  852.           display.  The default  Error_line  if none is specified in the
  853.           Menu  Definition File, is a blank line.
  854.  
  855.  
  856.  
  857.  
  858.           Ford Aerospace and             11
  859.           Communication Corp.
  860.  
  861.  
  862.  
  863.                                                             Drawing  A14589
  864.                                                             April 17, 1985
  865.  
  866.  
  867.           4.4.2  _S_e_l_e_c_t_i_o_n  The  Selection  Control_Identifier is used to
  868.           specify  each  menu selection  key and the resulting action when
  869.           the menu is running. The form of the Selection instruction is:
  870.  
  871.                The   Control_Identifier,    Selection  ,   followed  by   a
  872.           Word_Separator,  followed  by  a User_Entry where  the  character
  873.           string  is one character specifying the keyboard key to  type  in
  874.           order  to invoke action when this menu is used.  This is followed
  875.           by  another  Word_Separator,   followed  by  one  of  a  set   of
  876.           Action_Identifiers   that   define  what  will  occur  when   the
  877.           designated  key is typed at this menu being defined.  The set  of
  878.           Action_Identifiers is:
  879.  
  880.           Ada       If the designated key is typed at the running menu, an
  881.                     Ada procedure will be started. The procedure must be
  882.                     linked to the Menu Handler software. The procedure runs
  883.                     to completion, and the Menu Handler continues follow-
  884.                     ing.
  885.  
  886.           Task      If the designated key is typed, the task specified will
  887.                     begin executing in background. The task must not
  888.                     require the terminal or else it will not perform
  889.                     correctly.
  890.  
  891.           Program   If the designated key is typed, the program specified
  892.                     will begin executing. The program will run in fore-
  893.                     ground and take control of the terminal. On completion,
  894.                     it will return control to the Menu Handler.
  895.  
  896.           Menu      If the designated key is typed, the Menu specified will
  897.                     be called and appear on the screen. The Menu Handler is
  898.                     still controlling the terminal and accepting inputs,
  899.                     but it is using a different Menu Definition Table to
  900.                     format the display and process inputs.
  901.  
  902.                Following  one of these Action_Identifiers is  a
  903.           Word_Separator, and then a User_Entry,  where the character
  904.           string is the name of the Task, Program, or Menu to be called.
  905.  
  906.                The  user  can define only one Task or Program in  the
  907.           selection instruction.  However,  a Menu can be included in the
  908.           instruction after a Task or Program is specified. An example of
  909.           this is shown below.
  910.  
  911.                A Menu Action_Identifier listed in the Selection instruction
  912.           will cause the specified menu to be called to the screen.  If the
  913.           Menu is specified after a Program,  the menu will appear on the
  914.           screen after  the terminal control is returned to the Menu
  915.           Handler  from the Program. If the menu was specified after a Task
  916.           or by itself, the terminal control never leaves the Menu Handler,
  917.           and the menu will  appear  on  the screen immediately after the
  918.           selection  is made.  A message will be given at run time if a
  919.           selection is made for a menu for which there is no Menu
  920.  
  921.  
  922.  
  923.  
  924.           Ford Aerospace and             12
  925.           Communication Corp.
  926.  
  927.  
  928.  
  929.                                                             Drawing  A14589
  930.                                                             April 17, 1985
  931.  
  932.  
  933.           Definition Table.  Only one menu can be listed in the Selection
  934.           instruction,  and it must  be the  last Action_Identifier listed.
  935.           If no Menu Action_Identifier is listed,  then the current menu
  936.           will be restored when  terminal control is returned to the Menu
  937.           Handler.
  938.  
  939.                Some  examples  of Selection instructions and the action  of
  940.           the resulting menu are given:
  941.  
  942.           Instruction:        S:[G] TASK:[GOFORIT.CODE]
  943.           Action of Menu:
  944.  
  945.                When   "G"  is  entered  to  the  Menu  Handler,   the  task
  946.           GOFORIT.CODE is started in background.  Terminal control is still
  947.           in the Menu Handler.  Since no Menu Action_Identifier is  listed,
  948.           the  current  menu  displays again,  while the  task  GOFORIT  is
  949.           running.
  950.  
  951.           Instruction:  Slct [M] : M [moremenu]
  952.           Action of Menu:
  953.  
  954.                When  "M"  is  entered to the Menu  Handler,  the  new  menu
  955.           "moremenu"  is  called.  This new menu is produced  from  a  Menu
  956.           Definition  Table  just  as the previous one was.  The  new  Menu
  957.           Definition  file  dictates  what appears on the  screen  and  the
  958.           processing of the menu users inputs.
  959.  
  960.           Instruction:  Selection [@], Program:[test1],
  961.                          Menu:[samplers]
  962.           Action of Menu:
  963.  
  964.                When  '@' is entered to the Menu Handler,  the program test1
  965.           starts and takes the terminal control.  When test1 completes, the
  966.           Menu Handler regains terminal control and now calls a new menu to
  967.           display  on  the  screen and process inputs.  This  new  menu  is
  968.           produced  using the Menu Definition Table  "samplers",  which was
  969.           generated using this same Menu Compiler.
  970.  
  971.                The  Column_number  and Line_number instructions described
  972.           below are used to put text on the menu display.  When the Menu
  973.           Handler is run,  the menu display area on the screen is cleared.
  974.           The menu designer must use the following instructions to place
  975.           whatever is desired on the display.
  976.  
  977.           4.4.3  _C_o_l_u_m_n__n_u_m_b_e_r  The  Column_number  Control_Identifier
  978.           sets  the  screen  column position  so  that  some character
  979.           string can be  shown  at  this position  on  the  menu display.
  980.           The form  for  a  Column_number instruction is:
  981.  
  982.                The  Control_Identifier,   Column_number  ,  followed  by  a
  983.           Word_Separator,  followed  by  a User_Entry where  the  delimited
  984.           character  string  is an integer range 1 to  the  maximum  column
  985.           number, designating the column where the desired text will appear
  986.  
  987.  
  988.  
  989.  
  990.           Ford Aerospace and             13
  991.           Communication Corp.
  992.  
  993.  
  994.  
  995.                                                             Drawing  A14589
  996.                                                             April 17, 1985
  997.  
  998.  
  999.           on   the   menu  display.   Optionally  following,   is   another
  1000.           Word_Separator,  then  another  User_Entry  where  the  delimited
  1001.           character  string  is  the desired text to  appear  on  the  menu
  1002.           display.
  1003.  
  1004.           4.4.4  _L_i_n_e__n_u_m_b_e_r  The  Line_number Control_Identifier sets the
  1005.           screen line position so  that some character string can be shown
  1006.           at this  position  on the menu display. The form for a
  1007.           Line_number Instruction is:
  1008.  
  1009.                The  Control_Identifier,    Line_number  ,   followed  by  a
  1010.           Word_Separator,  followed  by  a User_Entry where  the  delimited
  1011.           character  string  is  an  integer range 1 to  the  maximum  line
  1012.           number,  designating the line where the desired text will  appear
  1013.           on the menu display.  As with the Column_number, a Word_Separator
  1014.           and  a  User_Entry  can optionally follow containing text  to  be
  1015.           displayed at the desired position on the menu display.
  1016.  
  1017.                The  optional User_Entry containing desired text can only be
  1018.           put following   a   Column_number  instruction   or   a
  1019.           Line_number instruction,  and  it must be separated from the
  1020.           instruction by a Word_Separator.  The  first  character of the
  1021.           desired  text  will appear  on  the  menu display at the last
  1022.           set  column  and  line positions.  Column 1 and Line 1 are the
  1023.           default display positions prior  to  the  column  or  line number
  1024.           being  set  using  these instructions.  The maximum line number
  1025.           and maximum column  number will  be  parameters  of  the  Menu
  1026.           Handler  package.  They  are originally  set to 80 for the max-
  1027.           imum column number,  and 21  for the maximum line number.  How-
  1028.           ever, they can be changed to fit the display terminals in use.
  1029.  
  1030.                Following are examples of Column_number instructions,
  1031.           Line_number instructions, and defining text on the menu display:
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.           Ford Aerospace and             14
  1057.           Communication Corp.
  1058.  
  1059.  
  1060.  
  1061.                                                             Drawing  A14589
  1062.                                                             April 17, 1985
  1063.  
  1064.  
  1065.           Example:
  1066.                C,[1]     Line [3]: [Type "A" to run SAMPLE program]
  1067.           Results in the following menu display:
  1068.                       Column
  1069.                         1
  1070.  
  1071.           Line 3        Type "A" to run SAMPLE program
  1072.  
  1073.           Example:
  1074.                Line_number [5]: Column_number [13],
  1075.                [Pick one of the following letters]
  1076.                Line [7]
  1077.                [X]  Column:[18] [Y],    Column:[22] [Z]
  1078.           Results in the following menu display:
  1079.                          1111111222
  1080.                  Column  3456789012
  1081.  
  1082.           Line 5         Pick one of the following letters
  1083.  
  1084.           Line 7         X    Y   Z
  1085.  
  1086.                The  Line_number and Column_number instructions are a common
  1087.           use of  more  than  one instruction on a line.  Note  that  the
  1088.           Menu Handler  puts  no text on the menu display related to  the
  1089.           valid keyboard   selections  defined  in  the  Menu  Definition
  1090.           File. Therefore,   the  user  should  use  the  above  text
  1091.           displaying mechanism  to  display on the menu all valid key
  1092.           selections  and their  corresponding  action.  The  user can
  1093.           specify  up  to  the maximum  column  number of characters in the
  1094.           User_Entry  for  the text.  However, an error will be given if
  1095.           the string will not fit on a line given the latest column set-
  1096.           ting. For example: Assuming the maximum column number is 80, the
  1097.           instruction
  1098.                COLUMN [50], [{some 31 character string........}]
  1099.           will give an error from Menu Compiler.
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.           Ford Aerospace and             15
  1123.           Communication Corp.
  1124.  
  1125.  
  1126.  
  1127.                                                             Drawing  A14589
  1128.                                                             April 17, 1985
  1129.  
  1130.  
  1131.           5.  _O_p_e_r_a_t_i_n_g__I_n_s_t_r_u_c_t_i_o_n_s
  1132.  
  1133.            1.  Create a Menu Definition file using the Menu Definition
  1134.                Language. Any available editor may be used. This file must
  1135.                be copied into the filename that has been specified in the
  1136.                Mencon file as the input file to the Menu Compiler. For
  1137.                example, if the mencon file has the filename menu_def as the
  1138.                input file to the menu compiler, the Menu Definition file
  1139.                would have to be copied into menu_def.
  1140.  
  1141.            2.  Execute the main Ada program Menuread within the Ada
  1142.                environment. This creates a non-readable Menu Definition
  1143.                Table that is referred to by the title the user gave the
  1144.                menu when it was defined in step 1. Refer to Section III,
  1145.                Menu Definition Language Syntax, for further explanation of
  1146.                Menu Definition title syntax.
  1147.  
  1148.            3.  Copy the Menu Definition Table into the filename specified
  1149.                as the input file to the Menu Handler in the Mencon file.
  1150.                For example, if the mencon file has the filename menu_tabl
  1151.                as the input file to the menu handler, the Menu Definition
  1152.                Table would have to be copied into menu_tabl.
  1153.  
  1154.            4.  Execute the main Ada program Menushow within the Ada
  1155.                environment.
  1156.  
  1157.            5.  The menu displayed is based on the Menu Definition. The keys
  1158.                that can be typed are those given in valid selection
  1159.                instructions in the Menu Definition file. Invalid key selec-
  1160.                tions are flagged by a bad selection message as defined in
  1161.                the Menu Definition file. The lines of text displayed are
  1162.                those the user specified in the Menu Definition file.
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.           Ford Aerospace and             16
  1189.           Communication Corp.
  1190.  
  1191.  
  1192.  
  1193.                                                             Drawing  A14589
  1194.                                                             April 17, 1985
  1195.  
  1196.  
  1197.           6.  _A_d_a__P_a_c_k_a_g_e__D_e_s_c_r_i_p_t_i_o_n_s
  1198.  
  1199.                Each package in the Menu Manager is split into two files.
  1200.           One file contains the package specification and the other con-
  1201.           tains the package body. The file that contains the package
  1202.           specification has a filename that ends in e. The file that con-
  1203.           tains the package body has a filename that ends in d. The full
  1204.           library unit name (i.e. the package name) is the same for both
  1205.           the specification and the body files. The filenames differ only
  1206.           in that one ends in e and the other ends in d. The filenames of
  1207.           each package are taken from the first four characters of the unit
  1208.           name, concatenated with the last three characters of the unit
  1209.           name, and appended with an e or d as appropriate. An eight char-
  1210.           acter file naming convention was observed, since many operating
  1211.           systems will not allow more than an eight character file name.
  1212.  
  1213.                The package descriptions are arranged alphabetically begin-
  1214.           ning with the units needed by the Menu Compiler, followed by the
  1215.           units needed by the Menu Handler. A * indicates the package is
  1216.           used by both the Menu Compiler and Menu Handler. The last
  1217.           descriptions are of the two main programs, Menuread.ada and
  1218.           Menushow.ada.
  1219.  
  1220.           6.1  _M_e_n_u__C_o_m_p_i_l_e_r__P_a_c_k_a_g_e_s
  1221.  
  1222.           6.1.1  _C_o_m_p_i_l_e_r__M_e_s_s_a_g_e_s *
  1223.  
  1224.                This package contains the procedures, data structures and
  1225.           values necessary for displaying messages during compilation.
  1226.  
  1227.                All the messages that the Menu Compiler and Menu Handler
  1228.           issue are in the COMERRS file. The first line is the code of
  1229.           severity for the message: NO_ERROR for information messages that
  1230.           are not related to errors, WARNING_ERROR for errors that that
  1231.           will not terminate the compilation or the creation of the Menu
  1232.           Definition Table, DISABLING_ ERROR for errors that will not ter-
  1233.           minate the compilation but will terminate the creation of the
  1234.           Menu Definition Table, and FATAL_ERROR for errors severe enough
  1235.           to terminate both the compilation and the creation of the Menu
  1236.           Definition Table. The second line is a 236 character line con-
  1237.           taining the text of the error message.
  1238.  
  1239.                One procedure (Initilize_Messages) of this package reads the
  1240.           COMERRS file into an array kept in the package. The array is used
  1241.           during compilation. The file is open only when it is initially
  1242.           being read, then closed for the duration of the program run.
  1243.  
  1244.                Compiler_Messages is contained in the files Compgesd.ada and
  1245.           Compgese.ada. The Compiler_Messages package is dependent on the
  1246.           Text_Handler_Subset and Text_IO Ada packages.
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.           Ford Aerospace and             17
  1255.           Communication Corp.
  1256.  
  1257.  
  1258.  
  1259.                                                             Drawing  A14589
  1260.                                                             April 17, 1985
  1261.  
  1262.  
  1263.                Table 3     Menu Compiler and Menu Handler Error Codes
  1264.  
  1265.            ----------------------------------------------------------------
  1266.           | Severity Code    | Definition                                  |
  1267.            ----------------------------------------------------------------
  1268.           | NO_ERROR         | Information messages not related to errors  |
  1269.            ----------------------------------------------------------------
  1270.           | WARNING_ERRORS   | Errors that will not terminate compilation  |
  1271.           |                  | or the creation of the Menu Definition      |
  1272.           |                  | Table.                                      |
  1273.            ----------------------------------------------------------------
  1274.           | DISABLING_ERROR  | Errors that will not terminate compilation, |
  1275.           |                  | but will terminate the creation of the Menu |
  1276.           |                  | Definition Table.                           |
  1277.            ----------------------------------------------------------------
  1278.           | FATAL_ERROR      | Errors severe enough to terminate both the  |
  1279.           |                  | compilation and the creation of the Menu    |
  1280.           |                  | Definition Table.                           |
  1281.            ----------------------------------------------------------------
  1282.  
  1283.           6.1.2  _D_i_s_p_l_a_y__P_r_o_c_e_s_s_i_n_g *
  1284.  
  1285.                This package contains the procedures to handle the Menu
  1286.           Display.  It stores the screen layout as an array of strings. The
  1287.           procedures are used to process the array of strings, and output
  1288.           the display to the screen.
  1289.  
  1290.                The package uses a Current Read Counter, and a Current Write
  1291.           Counter.  These values indicate the next display line to be read
  1292.           and written from the display array. Display lines are read when
  1293.           the display is put to the Menu Definition Table file. Display
  1294.           lines are written when the Menu Definition Table file contains
  1295.           text to be put into the screen layout, and when the Menu Defini-
  1296.           tion Table is read by the Menu Handler.
  1297.  
  1298.                Display_Processing is contained in the files Dispingd.ada
  1299.           and Dispinge.ada. The Display_Processing unit is dependent on the
  1300.           Text_IO Ada package.
  1301.  
  1302.           6.1.3  _H_a_n_d_l_e__C_o_m_p_i_l_e_r__C_o_m_p_o_n_e_n_t_s  This package contains the pro-
  1303.           cedures used to process the compiler variables, i.e. the current
  1304.           line and column number, the bad selection message, and processing
  1305.           related to specific Control Identifiers.
  1306.  
  1307.                Handle_Compiler_Components is contained in the files
  1308.           Handntsd.ada and Handntse.ada. The Handle_Compiler_Components
  1309.           unit is dependent on the Text_Handler_Subset Ada package.
  1310.  
  1311.           6.1.4  _P_r_o_c_e_s_s__C_o_n_f_i_g_u_r_a_t_i_o_n *
  1312.  
  1313.                This package contains the user defined items as read from
  1314.           the configuration file. The objects are kept in the package
  1315.           specification so that they are accessible to the main procedures
  1316.  
  1317.  
  1318.  
  1319.  
  1320.           Ford Aerospace and             18
  1321.           Communication Corp.
  1322.  
  1323.  
  1324.  
  1325.                                                             Drawing  A14589
  1326.                                                             April 17, 1985
  1327.  
  1328.  
  1329.           of the Menu Compiler, and the Menu Handler. The objects are also
  1330.           given default values in case an error occurs while reading the
  1331.           file, all objects will still have legal values. If problems do
  1332.           occur while the configuration file is being read, a !! prompt
  1333.           signals the user that problems exist. This is necessary because
  1334.           before reading the configuration file, the Menu Manager programs
  1335.           do not know how large the screen width is, and full text lines
  1336.           may not be correctly displayed. In any case, the configuration
  1337.           objects will at least have legal default values so the Menu
  1338.           Manager procedures can perform.
  1339.  
  1340.                Process_Configuration is contained in the files Prociond.ada
  1341.           and Procione.ada. The Process_Configuration unit is dependent on
  1342.           the Text_ IO and Text_Handler_Subset Ada packages.
  1343.  
  1344.           6.1.5  _P_r_o_c_e_s_s__M_e_n_u__C_o_n_t_r_o_l__T_a_b_l_e *
  1345.  
  1346.                This package contains the subprograms necessary to hold and
  1347.           use the Menu Control list. This list is a dynamic list of Menu
  1348.           Control items. Each item in the list characterizes a menu selec-
  1349.           tion. Information contained in each item includes: the selection
  1350.           key defined in the menu, the type of action performed when this
  1351.           key is typed, and the name of the process or command executed.
  1352.  
  1353.                Process_Menu_Control_Table is contained in the files Proc-
  1354.           bled.  ada and Procblee.ada. The Process_Menu_Control_Table unit
  1355.           is dependent on the Sequential_IO, Text_IO, and
  1356.           Text_Handler_Subset Ada packages.
  1357.  
  1358.           6.1.6  _P_r_o_c_e_s_s__M_e_n_u__D_e_f__S_t_r_i_n_g *
  1359.  
  1360.                This package is used by the Menu Compiler, and contains the
  1361.           subprograms necessary for basic processing of the Menu Definition
  1362.           file. The Menu Definition file is written in the Menu Definition
  1363.           Language, and is a description of the menu display and menu
  1364.           action.  The file can be thought of a series of lexical units,
  1365.           that are characters in a set of characters. The characters are
  1366.           arranged in the file so they can be sequentially extracted. This
  1367.           package contains subprograms to extract and handle these lexical
  1368.           units. Analyzing the lexical units for correct content and order
  1369.           is a function of the Handle_ Compiler_Components package. No com-
  1370.           piler errors regarding lexical units appears in this package.
  1371.  
  1372.                The Menu Definition file is an external file that is created
  1373.           and modified with an available editor, and uses the operations of
  1374.           a particular operating system. One of the functions of this pack-
  1375.           age is to transfer the external file to a Menu Definition string.
  1376.           The string is a dynamic character string that contains all the
  1377.           characters in the file. The string is kept in this package and is
  1378.           processed when the lexical units are extracted. This keeps the
  1379.           Menu Defintion file open for a minimum amount of time.
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.           Ford Aerospace and             19
  1387.           Communication Corp.
  1388.  
  1389.  
  1390.  
  1391.                                                             Drawing  A14589
  1392.                                                             April 17, 1985
  1393.  
  1394.  
  1395.                Process_Menu_Def_String is contained in the files
  1396.           Procinge.ada and Procingd.ada. The Process_Menu_Def_String unit
  1397.           is dependent on the Text_IO and Text_Handler_Subset Ada packages.
  1398.  
  1399.           6.1.7  _T_e_x_t__H_a_n_d_l_e_r__S_u_b_s_e_t
  1400.  
  1401.                This package is a subset of the Text Handler package from
  1402.           the Language Reference Manual (ANSI/MIL-STD-1815A). It contains
  1403.           only the procedures needed by the Menu Manager project. The TEXT
  1404.           type is a dynamic character string type. This is implemented
  1405.           using access types where the object is a pointer to a string. The
  1406.           string expands dynamically because the object points to a new
  1407.           string that includes the text of the previous string and more.
  1408.           This is one of the few non- generic library units in the Menu
  1409.           Manager, and must be compiled before the other units are.
  1410.  
  1411.                Text_Handler_Subset is contained in the files Textsetd.ada
  1412.           and Textsete.ada. The Text_Handler_Subset unit is dependent on
  1413.           the Unchecked_Deallocation Ada package.
  1414.  
  1415.           6.1.8  _P_r_o_c_e_s_s__I_n_i_t_i_a_t_o_r
  1416.  
  1417.                This is the package body for the Process_Initiator package.
  1418.           This file will be edited by the user to provide necessary pro-
  1419.           cedures run from the Menu Handler. Procedures must be supplied by
  1420.           the user to interface between the Ada environment and the operat-
  1421.           ing system command line interpreter. If the Ada environment does
  1422.           not have the capability of issuing a command line from within the
  1423.           Ada program, the Menu Handler cannot be used to issue commands to
  1424.           the operating system command line interpreter.
  1425.  
  1426.                Process_Initiator is contained in the files Proctord.ada and
  1427.           Proctore.ada. The Process_Initiator unit is dependent on the
  1428.           Text_IO Ada package.
  1429.  
  1430.           6.2  _M_e_n_u__H_a_n_d_l_e_r__P_a_c_k_a_g_e_s
  1431.  
  1432.           6.2.1  _C_o_n_t_r_o_l_l_i_n_g__M_e_n_u__I_n_f_o__L_i_n_e
  1433.  
  1434.                This is the package that holds and processes the Menu Infor-
  1435.           mation line. This line appears at the next to last line of the
  1436.           Menu Display.  It conveys simple information to the user when the
  1437.           menu is displayed.  The line is usually blank but will display a
  1438.           bad selection or task started message if necessary. This package
  1439.           can be modified to contain other text information should the sys-
  1440.           tem be expanded.
  1441.  
  1442.                Controlling_Menu_Info_Line is contained in the files
  1443.           Contined.ada and Continee.ada. This unit has no dependencies.
  1444.  
  1445.           6.2.2  _H_a_n_d_l_e__P_r_o_c_e_s_s_e_s  This package contains the subprograms
  1446.           used by the Menu Handler to process the requests for action that
  1447.           result from the menu users input. This package will also contain
  1448.  
  1449.  
  1450.  
  1451.  
  1452.           Ford Aerospace and             20
  1453.           Communication Corp.
  1454.  
  1455.  
  1456.  
  1457.                                                             Drawing  A14589
  1458.                                                             April 17, 1985
  1459.  
  1460.  
  1461.           the file name of the Menu Definition Table that defined the next
  1462.           menu to be displayed.
  1463.  
  1464.                Handle_Processes is contained in the files Handsesd.ada and
  1465.           Handsese.ada. The Handle_Processes unit is dependent on the Text_
  1466.           Handler_Subset Ada package.
  1467.  
  1468.           6.2.3  _P_r_o_c_e_s_s__I_n_i_t_i_a_t_o_r
  1469.  
  1470.                This package contains two procedures, Ada_Procedure_Call and
  1471.           Command_Line_Processor, the bodies of which must be user supplied
  1472.           except for a few sample and skeletal statements. These procedures
  1473.           provide the interface between the Menu Handler and the command
  1474.           line interpreter, and the interface between the Menu Handler and
  1475.           any Ada procedures that the user wants to link to the Menu
  1476.           Handler program. The package specification contains procedure
  1477.           specifications for the two interface procedures. These should not
  1478.           be changed since this provides the link between the interface
  1479.           procedures and the rest of the Menu Handler software. The user
  1480.           must supply the statements in the procedure bodies to insure that
  1481.           the procedures input and return the desired values. Refer to Sec-
  1482.           tion II, Description of the Mencon and Process_Initiator Files,
  1483.           for a more complete description of the necessary user supplied
  1484.           procedure bodies.
  1485.  
  1486.                Process_Initiator is contained in the files Proctord.ada and
  1487.           Proctord.ada. The Process_Initiator unit is dependent on the
  1488.           Text_IO Ada package.
  1489.  
  1490.           6.3  _M_a_i_n__P_r_o_g_r_a_m_s
  1491.  
  1492.           6.3.1  _M_e_n_u_r_e_a_d
  1493.  
  1494.                This is the main processor routine for the Menu Compiler.
  1495.           The procedure first reads the configuration file Mencon. It then
  1496.           instantiates the packages needed using the values found in Men-
  1497.           con, and reads the Menu Definition input file. The name of this
  1498.           file is specified in the configuration file. Menuread processes
  1499.           the Menu Definition file to create the Menu Definition Table used
  1500.           by the Menu Handler.
  1501.  
  1502.                Menuread is contained in the file Menuread.ada. The Menuread
  1503.           procedure is dependent on the Text_IO,
  1504.           Handle_Compiler_Components, Display_Processing,
  1505.           Process_Menu_Control_Table, Process_Menu_Def_ String,
  1506.           Compiler_Messages, Process_Configuration, and Text_Handler_ Sub-
  1507.           set Ada packages.
  1508.  
  1509.           6.3.2  _M_e_n_u_s_h_o_w
  1510.  
  1511.                This procedure is the main program executed when the Menu
  1512.           Handler is run. Menushow first reads the configuration file Men-
  1513.           con.  Using the values in that file, the program will instantiate
  1514.  
  1515.  
  1516.  
  1517.  
  1518.           Ford Aerospace and             21
  1519.           Communication Corp.
  1520.  
  1521.  
  1522.  
  1523.                                                             Drawing  A14589
  1524.                                                             April 17, 1985
  1525.  
  1526.  
  1527.           packages to create procedures that will run for this particular
  1528.           configuration.  The program reads the Menu Definition Table
  1529.           created by the Menu Compiler.  This file name is specified in the
  1530.           configuration file. Menushow will display the proper menu layout,
  1531.           and perform the proper processing on the users inputs.
  1532.  
  1533.                Menushow is contained in the file Menushow.ada. The Menushow
  1534.           procedure is dependent on the Text_IO, Display_Processing, Pro-
  1535.           cess_ Menu_Control_Table, Compiler_Messages,
  1536.           Process_Configuration, Text_ Handler_Subset,
  1537.           Controlling_Menu_Info_Line, Handle_Processes, and
  1538.           Process_Initiator Ada packages.
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.           Ford Aerospace and             22
  1585.           Communication Corp.
  1586.  
  1587.  
  1588.  
  1589.                                                             Drawing  A14589
  1590.                                                             April 17, 1985
  1591.  
  1592.  
  1593.           7.  _A_p_p_e_n_d_i_x__1__I_n_s_t_a_l_l_a_t_i_o_n
  1594.  
  1595.                Each Ada package in the Menu Manager is split into two
  1596.           files. One file contains the package specification and the other
  1597.           contains the package body. The file that contains the package
  1598.           specification has a filename that ends in e. The file that con-
  1599.           tains the package body has a filename that ends in d. The full
  1600.           library unit name (i.e.  the package name) is the same for both
  1601.           the specification and the body files. The filenames differ only
  1602.           in that one ends in e and the other ends in d. The filenames of
  1603.           each package are taken from the first four characters of the unit
  1604.           name, concatenated with the last three characters of the unit
  1605.           name, and appended with an e or d as appropriate. An eight char-
  1606.           acter naming convention was observed, since many operating sys-
  1607.           tems will not allow filenames of more than eight characters.
  1608.           These names can be changed by the user if their particular system
  1609.           has the capability of reading more than eight characters. The
  1610.           main procedures (Menuread.ada and Menushow.ada) have the same
  1611.           unit name as filenames.
  1612.  
  1613.                The following are the files delivered:
  1614.  
  1615.              - Overhead Files (Used by both the Menu Compiler and Menu
  1616.                Handler):
  1617.  
  1618.              - Comerrs
  1619.  
  1620.              - Mencon
  1621.  
  1622.  
  1623.           Menu Compiler
  1624.  
  1625.           Unit Name                    Files that contain the Unit
  1626.           ______________________________________________________________
  1627.           Compiler_Messages            Compgese.ada *
  1628.                                        Compgesd.ada *
  1629.           Display_Processing           Dispinge.ada *
  1630.                                        Dispingd.ada *
  1631.           Handle_Compiler_Components   Handntse.ada
  1632.                                        Handntsd.ada
  1633.           Process_Configuration        Procione.ada *
  1634.                                        Prociond.ada *
  1635.           Process_Menu_Control_Table   Procblee.ada *
  1636.                                        Procbled.ada *
  1637.           Process_Menu_Def_String      Procinge.ada
  1638.                                        Procingd.ada
  1639.           Text_Handler_Subset          Textsete.ada *
  1640.                                        Textsetd.ada *
  1641.           * indicates that these files are also used by the Menu Handler
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.           Ford Aerospace and             23
  1651.           Communication Corp.
  1652.  
  1653.  
  1654.  
  1655.                                                             Drawing  A14589
  1656.                                                             April 17, 1985
  1657.  
  1658.  
  1659.           Menu Handler
  1660.  
  1661.           Unit Name                    Files that contain the Unit
  1662.           ______________________________________________________________
  1663.           Controlling_Menu_Info_Line   Continee.ada
  1664.                                        Contined.ada
  1665.           Handle_Processes             Handsese.ada
  1666.                                        Handsesd.ada
  1667.           Process_Initiator            Proctore.ada
  1668.                                        Proctord.ada
  1669.           Main Programs                Menuread.ada
  1670.                                        Menushow.ada
  1671.  
  1672.           7.1  _C_o_m_p_i_l_i_n_g__a_n_d__L_i_n_k_i_n_g
  1673.  
  1674.            1.  The package specification with the filename Textsete.ada
  1675.                must be compiled first.
  1676.  
  1677.            2.  Compile the rest of the package specifications. (Those files
  1678.                with names ending in e.)
  1679.  
  1680.            3.  Compile the package bodies. (Those files with names ending
  1681.                ending in d.)
  1682.  
  1683.            4.  Compile the main programs (Menuread.ada and Menushow.ada.)
  1684.  
  1685.            5.  Link the main programs.
  1686.  
  1687.                The user should note that if any package specification is
  1688.           re-compiled, it is necessary to re-compile any of that specifica-
  1689.           tions dependencies. A package dependency is any other Ada library
  1690.           unit name included within the code in a "with" clause. Therefore,
  1691.           dependencies of unit "A" are those units that have "A" in their
  1692.           with clause. Refer to Section V, Ada Package Descriptions, to
  1693.           determine package dependencies.  In some versions of Ada, if a
  1694.           package body has been re-compiled its dependencies may also have
  1695.           to be re-compiled, even if the package specification has not been
  1696.           changed. Menuread is a dependency of the Ada packages Text_IO,
  1697.           Handle_Compiler_Components, Display_Processing, Process_Menu_
  1698.           Control_Table, Process_Menu_Def_String, Compiler_Messages,
  1699.           Process_Configuration, and Text_Handler_Subset.  Menushow is a
  1700.           dependency of the Ada packages TextIO, Display_Processing,
  1701.           Process_Menu_Control_Table, Compiler_Messages,
  1702.           Process_Configuration, Text_Handler_Subset,
  1703.           Controlling_Menu_Info_Line, Handle_Processes and
  1704.           Process_Initiator.  Changes to the above packages will require
  1705.           re-compiling and re-linking either or both of the main programs.
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.           Ford Aerospace and             24
  1717.           Communication Corp.
  1718.  
  1719.  
  1720.  
  1721.                                                             Drawing  A14589
  1722.                                                             April 17, 1985
  1723.  
  1724.  
  1725.           8.  _A_p_p_e_n_d_i_x__2__U_s_i_n_g__t_h_e__S_a_m_p_l_e__M_e_n_u__D_e_f_i_n_i_t_i_o_n__F_i_l_e_s
  1726.  
  1727.                Three sample Menu Definition Files have been delivered with
  1728.           the Menu Manager, file sampmen1.mne, sampmen2.mne, sampmen3.mne.
  1729.           These Menu Definition Files can be compiled by the Menu Compiler,
  1730.           and the menus run using the Menu Handler, to demonstrate how the
  1731.           Menu Manager works.
  1732.  
  1733.                The user should first examine the files, and follow the syn-
  1734.           tax of the Menu Definition Language used, to determine how the
  1735.           resulting menus will operate. The menus can be compiled and run
  1736.           following the installation of the Menu Manager software. It is
  1737.           not necessary to have interfaces to the operating system CLI
  1738.           (Command Line Interpreter) set up. These sample menus are
  1739.           intended to be used with the stub procedure delivered as the CLI
  1740.           interface, and the skeleton procedure delivered as the interface
  1741.           with other Ada procedures (a sample procedure delivered within
  1742.           the PROCESS_INITIATOR package is called by the sample menus).
  1743.  
  1744.                To use the sample menus, follow the installation instruc-
  1745.           tions so that the program Menuread and Menushow exist as execut-
  1746.           able programs. It is assumed that the MENCON configuration file
  1747.           contains the default values, if the values have been changed, the
  1748.           instructions discussed here will differ accordingly.
  1749.  
  1750.                Copy the sampmen1.mne file into the filename MENUFILE (this
  1751.           is the name of the Menu Compiler input file as defined in the
  1752.           MENCON configuration file).
  1753.  
  1754.                Execute the Menuread program. The screen should clear and a
  1755.           final message should appear. The program takes about 1 minute to
  1756.           run (based on medium loading on the Rolm Ada compiler on a Data
  1757.           General 4000 machine).
  1758.  
  1759.                Follow the two steps above for the other sample menu files,
  1760.           sampmen2.mne, and sampmen3.mne. Notice the error message that
  1761.           appears when the third menu is compiled. The errorous menu will
  1762.           be run to demonstrate the effect of doing so.
  1763.  
  1764.                The Menu Compiler has created Menu Definition Tables for the
  1765.           three menus.  The file names correspond to the title given as the
  1766.           first user literal in each Menu Definition File (see Menu Defini-
  1767.           tion Language guide). The titles, and consequently the file names
  1768.           of the three Menu Definition Tables are sam1, sam2, and sam3. The
  1769.           Menu Handler is now run with any of these Menu Definition Table
  1770.           files.
  1771.  
  1772.                Copy the file sam1 into the name MENUTABL. MENUTABL is the
  1773.           file where the Menu Handler receives its input, as defined in the
  1774.           MENCON configuration file.
  1775.  
  1776.                Execute the Menushow program. Some overhead processing is
  1777.           done (takes about 30 seconds), then the display will clear and
  1778.  
  1779.  
  1780.  
  1781.  
  1782.           Ford Aerospace and             25
  1783.           Communication Corp.
  1784.  
  1785.  
  1786.  
  1787.                                                             Drawing  A14589
  1788.                                                             April 17, 1985
  1789.  
  1790.  
  1791.           the display layout for the sam1 menu will appear as defined in
  1792.           the sampmen1.mne Menu Definition File. The inputs allowed are now
  1793.           dependent on the Menu Definition File. According to the sample,
  1794.           selection keys 'a', 'b', and 'c' are available. Try typing
  1795.           another key and the Bad Selection Message, also defined in the
  1796.           Menu Definition File, will appear at the bottom of the screen.
  1797.           The '!' character can be used to type a command line to the CLI
  1798.           (the line is passed to the stub CLI interface, which simply
  1799.           causes the line to be written back, and waits for a character
  1800.           typed to continue the Menu Handler). The default QUIT character
  1801.           defined in the MENCON file is the '@'. Typing this character will
  1802.           cause the Menu Handler to terminate unless the QUIT character in
  1803.           the MENCON file is changed.
  1804.  
  1805.                Selection key 'c' on the sam1 menu will call the sample Ada
  1806.           procedure delivered (this procedure dislays a line and waits for
  1807.           a character to be typed).  When the procedure is completed, the
  1808.           next menu handled is the sam2 menu. The layout for this menu is
  1809.           displayed, and user inputs are now processed based on the valid
  1810.           selection keys defined in the sampmen2.mne Menu Definition File.
  1811.           Note that the Bad Selection Message is different for this menu.
  1812.           Move to the sam3 menu by typing the selection key '3'.
  1813.  
  1814.                The sam3 menu had a syntax error in its Menu Definition
  1815.           File, but a Menu Definition Table was still created, and conse-
  1816.           quently, the menu can still be called. Note however that one  of
  1817.           the display lines is not displayed because the error appeared in
  1818.           the user literal defining that display line. Note also that all
  1819.           the selection keys still work as defined in the Menu Definition
  1820.           File, since no errors were found in the Selection instructions.
  1821.           This produces the interesting affect in that selection keys can
  1822.           be made available to the menu user, but no display is required to
  1823.           explain them. Remember that the Menu Display Layout, and the
  1824.           valid selection keys are completely defined by the user in the
  1825.           Menu Definition File.
  1826.  
  1827.                From the sam3 menu, the user can type '%' to execute the
  1828.           sample Ada procedure again, and the Menu Handler now handles the
  1829.           sam1 menu again. The Menu Handler is exited by hitting the QUIT
  1830.           character.
  1831.  
  1832.                This gives a quick demonstration of how the Menu Compiler
  1833.           and Handler works. The user should experiment with Menu Defini-
  1834.           tion Files to demonstrate the error messages that appear (for
  1835.           example the user can enter an Ada procedure name that in not
  1836.           currently linked to the handler, and try to make that selec- tion
  1837.           when the menu is run).
  1838.  
  1839.                The text of the three sample Menu Definition Files is shown
  1840.           below:
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.           Ford Aerospace and             26
  1849.           Communication Corp.
  1850.  
  1851.  
  1852.  
  1853.                                                             Drawing  A14589
  1854.                                                             April 17, 1985
  1855.  
  1856.  
  1857.                                     Sample Menu 1
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.    *  This is Sample Menu 1 delivered with the Menu Manager. This
  1864.    *  Menu calls a "Task", a "Program" and an Ada procedure followed
  1865.    *  by a call to another menu.
  1866.  
  1867.          [ sam1 ]    * Will create a Menu Definition Table called
  1868.                 *  "sam1"
  1869.  
  1870.  
  1871.   Line[2] Col[1]
  1872.       [  This is the Sample Menu 1, it is used to demonstrate the Menu Manager.]
  1873.    l[4]
  1874.       [ The selections available are:]
  1875.    l[7] col[10]
  1876.         [ 'a' to start the task 'ABDCE']
  1877.    l[9]
  1878.                 [ 'b' to start the program 'XYZ' ]
  1879.    l[11]
  1880.                 [ 'c' to start Ada procedure SAMPLE_1, and bring up menu 'sam2']
  1881.  
  1882.         Error_line_is [  That selection is bad, try again ]
  1883.  
  1884. S [ a ]    Task [  ABCDE  ]
  1885.  
  1886. Select [ b ]    program [ XYZ ]
  1887.  
  1888.     Select [c] Ada [ SAMPLE_1 ]    Menu [ sam2 ]
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.           Ford Aerospace and             27
  1915.           Communication Corp.
  1916.  
  1917.  
  1918.  
  1919.                                                             Drawing  A14589
  1920.                                                             April 17, 1985
  1921.  
  1922.  
  1923.                                     Sample Menu 2
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929. [sam2];Error[ Wrong selection, try again ]
  1930.  
  1931.     *  This the Sample Menu 2 delivered with the Menu Manager. This
  1932.         *  menu includes selection commands that only call the other menus,
  1933.         *  no programs, tasks or Ada procedures are called in this menu.
  1934.  
  1935.     Select [ 1 ] Menu [ sam1 ]
  1936.  
  1937.         Sel [3]        Menu_def_table [sam3]
  1938.  
  1939.    Line [5]   Column [6] 
  1940. [This menu is the Sample Menu 2 delivered to demonstrate the Menu Manager.]
  1941.    Line [8]
  1942. [The menu is used to select the other menus. The selections include:]
  1943.    Line_number [10] Col[15]
  1944. [type "1" to display menu "sam1"]
  1945.    Lin[11]
  1946. [type "3" to display menu "sam3"]
  1947.  
  1948.     *** End of sampmen2.mne, Menu Def Table sam2 ****
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.           Ford Aerospace and             28
  1981.           Communication Corp.
  1982.  
  1983.  
  1984.  
  1985.                                                             Drawing  A14589
  1986.                                                             April 17, 1985
  1987.  
  1988.  
  1989.                                     Sample Menu 3
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.     * This is Sample Menu 3 delivered with the Menu Manager for 
  1996.         * demonstration. This menu will contain to selections that
  1997.         * call the Ada procedure followed by displaying each of the
  1998.         * other sample menus. The 3 selection will contain a slight
  1999.         * syntax error. This will demonstrate how the compiler produces
  2000.         * a Menu Def Table even if Warning type errors are found. The
  2001.         * resulting action of the Menu should be examined by the user.
  2002.  
  2003. [sam3],Error[opps...]
  2004.  
  2005. L[4]
  2006. [This is Sample Menu 3 delivered to the user. The Men Definition File for]
  2007. L[5]
  2008. [this Menu contains some syntax errors, however a Menu Definition Table is]
  2009. L[6]
  2010. [still created, and the action of the resulting menu should be noted.]
  2011. l[9] Column [5]
  2012. [The '%' will call the Ada procedure "SAMPLE_1" followed by menu "sam1"]
  2013. l[10]
  2014. [The '#' will call the Ada procedure followed by menu "sam3"  * note the Line
  2015.     * has no closing delimiter.
  2016.     [ sample text]
  2017. l[12]
  2018. [The '$' will call the Ada procedure followed by displaying menu "sam2"]
  2019.  
  2020.  Select [ % ] Ada [SAMPLE_1]    Menu [sam1]
  2021.  Select [ # ]    Ada [SAMPLE_1]    Menu [sam3]
  2022.  Sel    [ $ ] Ada [SAMPLE_1] Menu [sam2]
  2023.  
  2024. l[15]
  2025. col [2] [Note that although the line defining selection '#' is not displayed]
  2026. l[16]   [the selection key still works. This is because the syntax error was]
  2027. l[17]   [found in the line to be put to the Menu Layout, and no error was   ]
  2028. l[18]   [found in the Select command identifying the '#' character.]
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.           Ford Aerospace and             29
  2047.           Communication Corp.
  2048.  
  2049.  
  2050.  
  2051.                                                             Drawing  A14589
  2052.                                                             April 17, 1985
  2053.  
  2054.  
  2055.           9.  _A_p_p_e_n_d_i_x__3__M_e_n_u__C_o_m_p_i_l_e_r__a_n_d__M_e_n_u__H_a_n_d_l_e_r__M_e_s_s_a_g_e_s
  2056.  
  2057.           FATAL_ERROR       Error in opening the Menu Definition File
  2058.                             given. The compiler cannot continue.  Check
  2059.                             that the file exists.
  2060.  
  2061.           FATAL_ERROR       Error in opening the Menu Definition Table
  2062.                             File. The file specification given in the Title
  2063.                             User Identifier may be an improper file specif-
  2064.                             ication for this operating system. The compiler
  2065.                             cannot continue.
  2066.  
  2067.           WARNING_ERROR     A User Literal specifying a Selection Key must
  2068.                             follow the Select Identifier. The selection
  2069.                             instruction will be ignored.
  2070.  
  2071.           WARNING_ERROR     The Selection Key given in the User Literal
  2072.                             must be a single character. The selection
  2073.                             instruction will be ignored.
  2074.  
  2075.           WARNING_ERROR     The Character given for a Selection Key is not
  2076.                             currently allowed. The selection instruction
  2077.                             will be ignored.
  2078.  
  2079.           WARNING_ERROR     An Action Identifier and a process to be ini-
  2080.                             tiated must follow the Selection Key in a
  2081.                             selection instruction.
  2082.  
  2083.           WARNING_ERROR     The Identifier given in the selection instruc-
  2084.                             tion is not a valid Action Identifier.
  2085.  
  2086.           WARNING_ERROR     A User Literal giving the file name of a pro-
  2087.                             cess to be initiated must follow an Action
  2088.                             Identifier. The Action Identifier will be
  2089.                             ignored.
  2090.  
  2091.           WARNING_ERROR     Only one process and one menu is allowed to be
  2092.                             initiated on each selection instruction. Subse-
  2093.                             quent processes defined in this selection
  2094.                             instruction will be ignored.
  2095.  
  2096.           WARNING_ERROR     A User Literal containing a file name of a Menu
  2097.                             Definition Table must follow a MENU Action
  2098.                             Identifier. This Menu Definition Table will be
  2099.                             used as the next menu for the selection being
  2100.                             defined.
  2101.  
  2102.           WARNING_ERROR     A User Literal specifying an integer column
  2103.                             number is expected after the COLUMN identifier.
  2104.  
  2105.           WARNING_ERROR     The Column number given is not in the range of
  2106.                             the current screen size configuration. The
  2107.                             column number value will remain unchanged.
  2108.  
  2109.  
  2110.  
  2111.  
  2112.           Ford Aerospace and             30
  2113.           Communication Corp.
  2114.  
  2115.  
  2116.  
  2117.                                                             Drawing  A14589
  2118.                                                             April 17, 1985
  2119.  
  2120.  
  2121.           WARNING_ERROR     A User Literal specifying an integer line
  2122.                             number is expected after the LINE identifier.
  2123.  
  2124.           WARNING_ERROR     The Line number given is not in the range of
  2125.                             the current screen size configuration. The line
  2126.                             number value will remain unchanged.
  2127.  
  2128.           WARNING_ERROR     A User Literal specifying a Bad Selection Mes-
  2129.                             sage is expected after the ERROR Identifier.
  2130.  
  2131.           WARNING_ERROR     The Bad Selection Message given is too long to
  2132.                             fit on the screen under the current screen size
  2133.                             configuration. The User Defined Variables can
  2134.                             be changed to set a new screen size configura-
  2135.                             tion.
  2136.  
  2137.           DISABLING_ERROR   The first non-comment Lexical Unit in the Menu
  2138.                             Definition File must be a User Literal contain-
  2139.                             ing the name of the Menu Definition Table file
  2140.                             that will be created. Compilation  will con-
  2141.                             tinue but no Menu Definition Table will be
  2142.                             created.
  2143.  
  2144.           WARNING_ERROR     The Control Identifier given is not recognized.
  2145.                             The Identifier will not be processed.
  2146.  
  2147.           WARNING_ERROR     The Text string specified is to long too fit on
  2148.                             the current Line and Column.  Text that was
  2149.                             there before will remain there.
  2150.  
  2151.           NO_ERROR          Error status is FATAL - No Menu Definition
  2152.                             table is created, and the Menu Compiler has
  2153.                             Aborted.
  2154.  
  2155.           NO_ERROR          Error Status is DISABLE - Menu Definition File
  2156.                             compiled completely, however a Menu Definition
  2157.                             Table was not created due to Disabling Errors.
  2158.  
  2159.           NO_ERROR          Error status is WARNING - Menu Definition File
  2160.                             compiled completely, and the Menu Definition
  2161.                             Table is created. However, errors may cause
  2162.                             UNPREDICTABLE RESULTS if the Menu Handler is
  2163.                             run with the table file created here.
  2164.  
  2165.           NO_ERROR          Error status is NO ERRORS - Menu Definition
  2166.                             File compiled completely, and the Menu Defini-
  2167.                             tion Table is created.
  2168.  
  2169.           FATAL_ERROR       Unable to find the Menu Definition Table given
  2170.                             for processing. Make sure the Menu Definition
  2171.                             Table was created by the compiler. The Menu
  2172.                             Handler will abort.
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.           Ford Aerospace and             31
  2179.           Communication Corp.
  2180.  
  2181.  
  2182.  
  2183.                                                             Drawing  A14589
  2184.                                                             April 17, 1985
  2185.  
  2186.  
  2187.           WARNING_ERROR     The Menu to be displayed was compiled with a
  2188.                             different screen size configuration then what
  2189.                             is currently in effect with this execution of
  2190.                             the Menu Handler. The previous menu will be
  2191.                             displayed.
  2192.  
  2193.           WARNING_ERROR     The name of the menu of the process given is
  2194.                             too long for the current configuration. The
  2195.                             User Defined variable can be adjusted to change
  2196.                             the maximum file name size.
  2197.  
  2198.           DISABLING_ERROR   The name given for the Menu Definition Table is
  2199.                             too long. No Menu Definition Table will be
  2200.                             created.
  2201.  
  2202.           NO_ERROR          Please enter the name of the Menu Definition
  2203.                             File to be compiled.
  2204.  
  2205.           FATAL_ERROR       Unable to find the Menu Definition Table given
  2206.                             for processing. Make sure the Menu Definition
  2207.                             Table was created by the compiler. The Menu
  2208.                             Handler will abort.
  2209.  
  2210.           WARNING_ERROR     Menu to be displayed was compiled with a dif-
  2211.                             ferent screen size configuration than what is
  2212.                             currently in effect with this execution of the
  2213.                             Menu Handler. The previous menu will be
  2214.                             displayed.
  2215.  
  2216.           WARNING_ERROR     The name of the menu of process given is too
  2217.                             long for the current configuration.  The user
  2218.                             defined variable can be adjusted to change the
  2219.                             maximum file name size.
  2220.  
  2221.           DISABLING_ERROR   The name given for the Menu Definition Table is
  2222.                             too long. No Menu Definition Table will be
  2223.                             created.
  2224.  
  2225.           NO_ERROR          Please enter the name of the Menu Definition
  2226.                             File to be compiled.
  2227.  
  2228.           FATAL_ERROR       The initial Menu Table file given is not found.
  2229.                             The Menu Handler will abort.
  2230.  
  2231.           FATAL_ERROR       The initial Menu Table file given was compiled
  2232.                             with a different configuration than is
  2233.                             currently running on the Menu Handler. The con-
  2234.                             figurations must be consistent for each menu
  2235.                             description. The Menu Handler will abort.
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.           Ford Aerospace and             32
  2245.           Communication Corp.
  2246.  
  2247.  
  2248.  
  2249.                                                             Drawing  A14589
  2250.                                                             April 17, 1985
  2251.  
  2252.  
  2253.           WARNING_ERROR     The Menu Table File for the menu selected is
  2254.                             not found. Make sure the Menu Definition File
  2255.                             for the menu was compiled. Previous Menu will
  2256.                             be displayed.
  2257.  
  2258.           WARNING_ERROR     The Menu selection was compiled with a dif-
  2259.                             ferent configuration than is currently running
  2260.                             on the Menu Handler. Previous Menu will be
  2261.                             displayed.
  2262.  
  2263.           WARNING_ERROR     The command line interpreter for this operating
  2264.                             system cannot process the given line. This Ada
  2265.                             environment must have the capability to pass a
  2266.                             command line to the system command line inter-
  2267.                             preter.
  2268.  
  2269.           WARNING_ERROR     The Command Line Interpreter for this operating
  2270.                             system cannot process this concurrent task. The
  2271.                             Ada environment must have the capability to
  2272.                             pass a command to the system command line
  2273.                             interpreter, and have it run concurrently with
  2274.                             this Menu Handler.
  2275.  
  2276.           WARNING_ERROR     The Command Line Interpreter returns errors
  2277.                             when the command given is issued.  The Ada
  2278.                             environment must have the capability to pass a
  2279.                             command to the system command line interpreter
  2280.                             and start the process.
  2281.  
  2282.           WARNING_ERROR     The Ada Procedure desired is not currently
  2283.                             linked to the Menu Handler software.  The pack-
  2284.                             age body PROCESS_INITIATOR must be edited to
  2285.                             include reference to the Ada procedure if the
  2286.                             procedure is desired in the Menu Definition.
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.           Ford Aerospace and             33
  2311.           Communication Corp.
  2312.  
  2313.  
  2314.  
  2315.                                                             Drawing  A14589
  2316.                                                             April 17, 1985
  2317.  
  2318.  
  2319.           10.  _A_p_p_e_n_d_i_x__4__G_l_o_s_s_a_r_y
  2320.  
  2321.           MENU                     This term refers to text displayed on
  2322.                                    the users screen, AND the users possible
  2323.                                    inputs to the system. Both the display
  2324.                                    and and the response to user input is
  2325.                                    involved in defining a menu.
  2326.  
  2327.           MENU DEFINITION FILE     The user supplied text file, written in
  2328.                                    the Menu Definition Language, that is
  2329.                                    the description of the menu display, and
  2330.                                    definition of valid user Inputs.
  2331.  
  2332.           MENU DEFINITION TABLE    The output from the Menu Compiler. This
  2333.                                    is a non-text table file containing the
  2334.                                    menu description in the form needed by
  2335.                                    the Menu Handler.
  2336.  
  2337.           PACKAGE                  This is an Ada library unit. A package
  2338.                                    contains procedures that can be called
  2339.                                    be referring to the package. The package
  2340.                                    may also contain objects of variable
  2341.                                    that are kept in the package for the
  2342.                                    life of its reference, even though the
  2343.                                    calling program may not be using a pro-
  2344.                                    cedure from that package. This allows a
  2345.                                    nice method of organizing processing.
  2346.  
  2347.           PROGRAM                  A file name or command that is passed to
  2348.                                    the operating system Command Line
  2349.                                    Interpretor, and is executed in fore-
  2350.                                    ground. The Menu Handler will wait for
  2351.                                    the command to finish before continuing.
  2352.  
  2353.           TASK                     A file name or command that is passed to
  2354.                                    the operating system Command Line
  2355.                                    Interpretor, and is executed in back-
  2356.                                    ground. The Menu Handler continues con-
  2357.                                    currently with the Task.
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.           Ford Aerospace and             34
  2377.           Communication Corp.
  2378.  
  2379.  
  2380.  
  2381.                                                             Drawing  A14589
  2382.                                                             April 17, 1985
  2383.  
  2384.  
  2385.           11.  _A_p_p_e_n_d_i_x__5__S_o_u_r_c_e__C_o_d_e
  2386.  
  2387.                This appendix contains the source code for the Menu Manger.
  2388.           The files are arranged in alphabetical order by file name. The
  2389.           user is urged to read the comments contained in the files
  2390.           Proctord.ada and Proctore.ada before attempting to supply the
  2391.           necessary procedures to interface between the Ada environment and
  2392.           the command line interpreter.  Refer also to Section II, Descrip-
  2393.           tion of the Mencon and Process_Initiator Files, for more explana-
  2394.           tion.
  2395.  
  2396.                For full Source Code Listing, refer to Drawing No. A14588
  2397.           delivered with the Menu Manager.
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.           Ford Aerospace and             35
  2443.           Communication Corp.
  2444.  
  2445.  
  2446.  
  2447.                                                             Drawing  A14589
  2448.                                                             April 17, 1985
  2449.  
  2450.  
  2451.                                       CONTENTS
  2452.  
  2453.  
  2454.            1.  Overview................................................   1
  2455.                1.1  User Related Objectives............................   2
  2456.                1.2  Software Product Objectives........................   3
  2457.                1.3  Using the Menu Compiler............................   4
  2458.                1.4  Using the Menu Handler.............................   4
  2459.  
  2460.            2.  Description of the Configuration File (Mencon)..........   6
  2461.  
  2462.            3.  Description of the Process_Initiator Ada Package........   7
  2463.  
  2464.            4.  Menu Definition Language Syntax.........................   8
  2465.                4.1  Introduction.......................................   8
  2466.                4.2  Definition of Basic Lexical Units..................   8
  2467.                4.3  Structure of Menu Definition File..................  10
  2468.                4.4  Instructions and Use of Control_Identifiers........  11
  2469.  
  2470.            5.  Operating Instructions..................................  16
  2471.  
  2472.            6.  Ada Package Descriptions................................  17
  2473.                6.1  Menu Compiler Packages.............................  17
  2474.                6.2  Menu Handler Packages..............................  20
  2475.                6.3  Main Programs......................................  21
  2476.  
  2477.            7.  Appendix 1 Installation.................................  23
  2478.                7.1  Compiling and Linking..............................  24
  2479.  
  2480.            8.  Appendix 2 Using the Sample Menu Definition Files.......  25
  2481.  
  2482.            9.  Appendix 3 Menu Compiler and Menu Handler Messages......  30
  2483.  
  2484.           10.  Appendix 4 Glossary.....................................  34
  2485.  
  2486.           11.  Appendix 5 Source Code..................................  35
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.           Ford Aerospace and            - i -
  2508.           Communication Corp.
  2509.  
  2510.  
  2511. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2512. --items.
  2513. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2514.     
  2515.  
  2516.  
  2517.                              Menu Manager
  2518.  
  2519.                       Contract N66001-85-C-0035
  2520.                       Naval Ocean System Center
  2521.  
  2522.  
  2523.                     Items of Interest Encountered
  2524.                         During Work on Project
  2525.  
  2526.  
  2527.    This report was prepared on June 24, 1984 as a result of discussion 
  2528. during  the demonstration of NOSC tool 48,  the Menu  Manager.  It  is 
  2529. being  sent  over  the network in lieu of a formally  delivered  final 
  2530. report. The list is a collection of information found in the following 
  2531. sources:
  2532.    - Monthly Progress Reports Delivered from November 84 - March 85
  2533.    - Presentation Slide Package, given on demonstration of Menu
  2534.      Manager tool, June 20, 1985
  2535.    - Programmers Notebook, on file in SVO Software Engineering Dept.
  2536.  
  2537.    The items are listed by month.
  2538.  
  2539.  
  2540. November 84
  2541.  
  2542.    Experiments  were  done  using the TeleSoft Ada  on  the  Sun  Work 
  2543. Station  with  Unix operating system.  Single character input was  not 
  2544. possible since the TEXT_IO.GET was reading from a buffer,  signaled by 
  2545. a RETURN key.  When return is hit, the characters previously typed are 
  2546. then passed to the input routines of the Ada program.  We were able to 
  2547. get  single character input by sending a call from the Ada program  to 
  2548. the operating System to put the terminal in raw mode, then after input 
  2549. session,  send  another  "stty" command to put the  terminal  back  in 
  2550. normal mode.
  2551.  
  2552.     Our  first Ada programs are written as Ada packages.  The packages 
  2553. contain the procedures necessary, and the initialization statements of 
  2554. the package form the whole program. The Ada package is run rather than 
  2555. running the procedures.
  2556.  
  2557.  
  2558. January 85
  2559.  
  2560.    Problems have been found using the TeleSoft Ada compiler. Using the 
  2561. command line ADA/MPP/SOURCE_LISTING <filename> is supposed to  compile 
  2562. the  source code and produce a source listing.  Run time errors  occur 
  2563. when  we run a program compiled in this way.  In Conversation with Tim 
  2564. LaSelle   of  TeleSoft,   he  informs  us  the  listing   feature   is 
  2565. unpredictable.
  2566.  
  2567.    We are receiving run errors when a very small program that declares 
  2568. a  Variant record is run.  The errors will not appear in the output of 
  2569. the program,  only on the display as the program is run. Error message 
  2570. is "Exception on Production #263" (the number varies). In conversation 
  2571. with  Tim LaSelle of TeleSoft,  he tells us that variant  records  and 
  2572. generic  processing is still unpredictable in TeleSoft Ada.  He  could 
  2573. not tell exactly what the different exception numbers meant.
  2574.  
  2575.  
  2576. February 85
  2577.  
  2578.    Test programs that do not run in the TeleSoft Ada environments will 
  2579. run  successfully in the Data General / Rolm Ada environment.  A  test 
  2580. program  taking 10 seconds to compile on the Rolm compiler took over 5 
  2581. minutes on TeleSoft.
  2582.  
  2583.    There has been some discussion on the legality of the following Ada 
  2584. code:
  2585.            type DYN_STRING (SIZE: NATURAL := 0) is
  2586.              record
  2587.                DATA: STRING (1..SIZE);
  2588.              end record;
  2589.            X : DYN_STRING := (5,"HELLO");
  2590.            Y : DYN_STRING := (6,"HELLOX");
  2591.                     .
  2592.                     .
  2593.            X := Y;
  2594.  
  2595.    The discussion involves whether the declaration fixes the length of 
  2596. the string or if the string is truly dynamic.  When tried on the  Rolm 
  2597. compiler,  the assignment is legal, however the object declarations as 
  2598. written  above  are  not legal.  In the case above,  memory  would  be 
  2599. allocated  for the object "X" and "Y" such that the  largest  possible 
  2600. type  could  be  accommodated;  this  means  a  string  of  constraint 
  2601. 0..NATURAL'LAST.
  2602.  
  2603.    In  our  final design for the Menu Manager,  we have realized  some 
  2604. inherent  characteristics of a system independent  Menu  Manager.  The 
  2605. ability   to   pass  a  string  to  the  operating  system   CLI   for 
  2606. interpretation  is dependent on the Ada environment and its  interface 
  2607. with  the operating system.  In our final product we will leave  stubs 
  2608. for  such  a  CLI call,  and the string to be passed  will  simply  be 
  2609. displayed.  Allowing  the  call  of further Ada  procedures  is  usage 
  2610. dependent.  We will leave sample code to show a call to one sample Ada 
  2611. procedure, but further Ada procedures desired to be called by the Menu 
  2612. Handler  will  involve  the user editing a section of  the  Ada  code, 
  2613. recompiling  that section and relinking the Menu Handler section (Menu 
  2614. Compiler will not have to be relinked).
  2615.  
  2616.  
  2617. March 85
  2618.  
  2619.    We  tried  to use an aggregate to assign the text for  the  program 
  2620. messages to a variable.  We got an error that the source line and  the 
  2621. string  literal  were too long.  We will have to put the text for  the 
  2622. messages on a file,  and read the text into the array variable at  run 
  2623. time.  We  reconstructed  the  code that caused the  error  and  tried 
  2624. compiling. A partial listing of that compile is below.
  2625.  
  2626. Ada 5.241 6/24/85 at 11:10:31    :UDD1:LAMARCHE:ADA:RUN:COMPGESD.ADA    page 1
  2627. ------+-------------------------------------------------------------------------
  2628.     1 ! 
  2629.     2 ! 
  2630.     3 ! -- COMPILER_MESSAGES;COMPGESD.ADA;KJL;04/18/85
  2631.     4 ! 
  2632.     5 ! -- Package body to handle compiler messages.
  2633.     6 ! 
  2634.  
  2635.  
  2636.    26 ! 
  2637.    27 ! with TEXT_IO;
  2638.    28 ! package body COMPILER_MESSAGES is
  2639.    29 ! 
  2640.    30 !    MESSAGE_SIZE: constant := 236;       -- string size of messages.
  2641.    31 !    LAST_MESSAGE: constant := 36;        -- number of messages in
  2642.       :                                                             COMERRS file
  2643.    32 ! 
  2644.    33 !     -- Set of severity codes
  2645.    34 !    type ERROR_TYPES is (FATAL_ERROR,DISABLING_ERROR,WARNING_ERROR,
  2646.       :                                                               NO_ERROR);
  2647.    35 ! 
  2648.    36 !     -- Structure used to store message information from COMERRs file.
  2649.    37 !    type MESSAGE_INFO is
  2650.    38 !      record
  2651.    39 !         ERROR_STATUS: ERROR_TYPES;
  2652.    40 !         MESSAGE_LINE: STRING(1..MESSAGE_SIZE);
  2653.    41 !      end record;
  2654.    42 ! 
  2655.    43 !    type MESSAGE_LIST_TYPE is array (1..LAST_MESSAGE) of MESSAGE_INFO;
  2656.    44 ! 
  2657.    45 ! 
  2658.    46 !    NUMBER_OF_ERRORS: INTEGER := 0;      -- Tally of all types of errors
  2659.    47 !    MESSAGE_LIST: MESSAGE_LIST_TYPE :=   (
  2660.    48 ! 1 =>
  2661.    49 ! (FATAL_ERROR,
  2662.    50 ! "Error in opening the Menu Definition File given. The compiler cannot
  2663. ------+-------------------------------------------------------------------------
  2664. Ada 5.241 6/24/85 at 11:10:31    :UDD1:LAMARCHE:ADA:RUN:COMPGESD.ADA    page 2
  2665. ------+-------------------------------------------------------------------------
  2666.       :                     continue. Check that the file exists.               
  2667.       :                                                                         
  2668.       :                                                                         
  2669. ------+-------------------------------------------------------------------------
  2670.   ***   Source line is too long.
  2671.   ***   String literal is too long.
  2672. ------+-------------------------------------------------------------------------
  2673.    51 !                                     "),
  2674.    52 ! 2 =>
  2675.    53 ! (FATAL_ERROR,
  2676. ------+-------------------------------------------------------------------------
  2677.   ***   Source line is too long.
  2678.   ***   String literal is too long.
  2679. ------+-------------------------------------------------------------------------
  2680.    54 ! "Error in opening Menu Definition Table file. The file specification
  2681.       :                             given in the Title User Identifier may be an
  2682.       :                        improper file spec for this operating system. The
  2683.       :                                     compiler can not continue.          
  2684.    55 !                                     "),
  2685.    56 ! 3 =>
  2686. ------+-------------------------------------------------------------------------
  2687.   ***   Source line is too long.
  2688.   ***   String literal is too long.
  2689. ------+-------------------------------------------------------------------------
  2690.  
  2691.