next up previous contents
Next: Complex Return Values Up: menu_display Previous: menu_display   Contents

Processing return Values

To help distinguish different data elements returned from the menu, two variables are used

$Cmenu::menu_sep
(this can be accessed and even set by user scripts) it separates individual item responses. This is most appropriate to check lists and data fields.

$Cmenu::menu_sepn
(this can be accessed and even set by user scripts). It defaults to the tilde ( ) character. It is used to separate elements with a data field value.

Simple menu options will only return a single value indicating either a function key pressed or an item selected. For such menus doing chop($sel) will be enough to pick out the return value. Possible values might be

``%EMPTY%''
the EXIT function has been selected. This is usually taken to mean an immediate exit from all menus or an abort from an editing spree.
``%UP%''
the QUIT function has been selected. This is usually taken to mean a menu sequence has been terminated, perhaps an editing session accepted or the user wishes to back-track through some menus.
``YES''
given from menu_show only - indicates a positive response from a confirmation screen
``NO''
given by menu_show only - indicates a negative response from a confirmation screen
variable text field
a menu selection has been made by text-label (see menu_item)
variable number
a menu selection has been made by value (see menu_item)
variable array
a complex menu response has been completed; this needs further processing


next up previous contents
Next: Complex Return Values Up: menu_display Previous: menu_display   Contents
Andy Ferguson (AFC) 2001-10-20