Difference between revisions of "MENU TO"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
==Class== | ==Class== | ||
Menus | Menus | ||
Line 15: | Line 12: | ||
==See Also== | ==See Also== | ||
− | [[@...MENU]], [[MENU AT]], [[MENU COMMAND]], [[MENU FIELDS]], [[MENU FILES]], [[MENU FORMAT]], [[MENU QUERY]], [[MENU SCOPE | + | [[@...MENU]], [[COL()]], [[MENU AT]], [[MENU COMMAND]], [[MENU FIELDS]], [[MENU FILES]], [[MENU FORMAT]], [[MENU QUERY]], [[MENU SCOPE]], [[READVAR()]], [[ROW()]] |
Line 33: | Line 30: | ||
<code lang="recital"> | <code lang="recital"> | ||
@10,10 prompt "edit"; | @10,10 prompt "edit"; | ||
− | message "edit a record." | + | message "edit a record." |
@11,10 prompt "append"; | @11,10 prompt "append"; | ||
− | message "add a record." | + | message "add a record." |
@12,10 prompt "delete"; | @12,10 prompt "delete"; | ||
− | message "delete a record." | + | message "delete a record." |
menu to choice | menu to choice | ||
do case | do case | ||
case choice=1 | case choice=1 | ||
− | + | do editfunc() | |
case choice=2 | case choice=2 | ||
− | + | do appendfunc() | |
case choice=3 | case choice=3 | ||
− | + | do deletefunc() | |
otherwise | otherwise | ||
− | + | dialog box "No choice." | |
endcase | endcase | ||
</code> | </code> | ||
Line 56: | Line 53: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
+ | [[Category:Menus]] | ||
+ | [[Category:Menus Commands]] |
Revision as of 08:33, 3 June 2009
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