MENU TO

From Recital Documentation Wiki
Revision as of 08:33, 3 June 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Class

Menus


Purpose

Return a number according to the menu item chosen


Syntax

MENU TO <memvar>


See Also

@...MENU, COL(), MENU AT, MENU COMMAND, MENU FIELDS, MENU FILES, MENU FORMAT, MENU QUERY, MENU SCOPE, READVAR(), ROW()


Description

The MENU TO <memvar> command returns a number from 1 to n, according to the menu item selected, and zero if [ABANDON] was pressed. The companion command is @<expN>,<expN> PROMPT "item" MESSAGE "text".

The READVAR() function may be used to return the current <memvar>.

The MENU TO <memvar> command starts at the <memvar> position within the range of 1 and the number of @…MENU items defined in the menu.

The COL() and ROW() function may be used to return the coordinates of the current MENU TO <memvar>.

These commands are supported for compatibility with other products. It is far better to use @…MENU…COMMAND for this purpose.


Example

@10,10 prompt "edit";
  message "edit a record."
@11,10 prompt "append";
  message "add a record."
@12,10 prompt "delete";
  message "delete a record."
menu to choice
do case
  case choice=1
      do editfunc()
  case choice=2
      do appendfunc()
  case choice=3
      do deletefunc()
  otherwise
      dialog box "No choice."
endcase


Products

Recital Mirage Server, Recital Terminal Developer