A choice command, menu command or menufile command is any line which starts with a blank or tab character. The command may be any built-in menu command or any valid DOS command.
When built-in menu commands are enabled, commands are processed one line at a time as follows:
Replace any substitution patterns found in the commands.
Examine the first word of command to decide whether the command is a built-in menu command or a DOS command.
Execute the command.
Examine the exit status of the last command executed. If it is not zero and this is a menu command or menufile command, menu terminates. If it is not zero and this is a choice command, menu displays
press RETURN to return to the menu...
and waits for you to type Return before redisplaying the menu. If it is zero, continue normally.
When built-in menu commands are disabled, commands are processed as follows:
Examine the first command to see if it is the param command. If the command is a param command, Menu displays the parameter form and allows data entry into parameter fields. When a parameter form is stored, all variables defined for the parameter form are passed to the following choice commands.
Executes the command group excluding the first command if it is the param command and the last command if it is either a menu or quit command.
Examine the exit status of the command group executed. If it is zero and the last command of the command group is either a menu or quit command, it is executed. If the exit status of the command group is not zero and this is either a menu or menufile command group, menu terminates. If the status is not zero and this is a choice command group, menu displays
press RETURN to return to the menu...
and waits for you to type Return before redisplaying the menu. If the exit status of the command group is zero, continue normally.
The following sections describe the menufile commands, menu commands and choice commands that are built into menu.