8.5 Invoking Menudef

The syntax for the menudef command is:

c:\> menudef [-c] [-uad123s] menufile [newmenufile]

The -c flag allows a choice to be placed next to another choice or background text. Normally, menudef reserves a blank at the beginning of each line, before and after each choice for terminals vhat either require a blank on the screen at the beginning and end of a reverse video field or do not have reverse video. You should use the -c flag only if you know that your menus will only run on terminals that do not require a blank at the beginning and end of reverse video fields.

The second optional group of flags specifies the operations that you may perform in menudef. Each letter specifies an additional operation that you may perform. If you do not specify these flags, the defaults flags are -uad123.

Table 8-2: Allowed Operation Flags

Flag Action

u UPDATE <F4> key allowed

a ADD <F6> key allowed

d DELETE (GOLD D) key allowed

1 Menu Description form or Menu File Description form allowed

2 Menu Picture screen allowed

3 Choice Description form allowed

s Simple version, starts in Menu Picture screen

The -3 flag works in conjunction with the -u and -a flags. For example, if you specify -a23, you can ADD a new choice, but you cannot update an existing choice.

The menufile argument names the file containing the description of menus and parameter forms. If menufile does not exist when you start menudef and the -s flag was specified, menudef creates a new menufile with an empty menu named 'Untitled.' If menufile does exist and contains menu descriptions, these menu descriptions can then be examined and modified with menudef.

When menudef exits, the new or updated menu descriptions are written to newmenufile if it is present; otherwise, the menu descriptions are written to menufile.