Menu item

A menu is an item stored in the account's master dictionary. The item is used by the menu processor to produce a formatted menu that includes presentation of options. The menu is created directly in the master dictionary and is invoked by entering its item-ID at TCL, similar to a TCL command. Each account has its own environment, and can have its own custom set of menus.

Master Dictionary
# Attribute Description
0 item-ID Name of the menu.
1 dictionary-code For a menu-defining item, this must be me.

Comments can follow the me dictionary-code to document the menu. These comments also can be displayed as a help message if this menu is invoked by another menu and you type ? and press ENTER. At least one space must separate me from the comments.

2 title Text to be displayed as the menu title.
3 - n option-1 {<vm>help-text-1] TCL-statement {<vm> TCL Statement...}} to option-n {<vm> help-text-n <vm> TCL-statement {<vm> TCL Statement... }} Text of the option as it is appears on the menu, followed by a value mark, optional help text followed by a value mark, and one or more TCL statements each followed by a value mark.

To request help, enter the option number for which help is desired, followed or preceded by a question mark. The help entry is optional. If the help entry is missing, the menu processor scans the TCL statement to determine if it invokes a macro or menu. If it does, the processor then scans the first line of the invoked macro or menu for comments. If it has comments, they are displayed as the help information.

The TCL statements are the statements to be executed for that option. These are any statements that can be entered at TCL, including another menu name. Each option can include as many TCL statements as desired. The entries for each menu option are separated by value marks.

The menu can contain as many options as desired.