title "Menus"
item "cmenu1()":item "cmenu2()":item "cmenu3()"
EndCustm
CustmOn
EndPrgm
cmenu3()
Prgm
Custom
title "Menu 3"
item "h":item "i":item "j":item "k"
title ""
title ""
title ""
title ""
title ""
title ""
title "Menus"
item "cmenu1()":item "cmenu2()":item "cmenu3()"
EndCustm
CustmOn
EndPrgm
These are very simple menus, just to show the idea. Each menu has one menu tab [F1] which displays
the menu items. Each menu program also has the same title item for [F8], which displays all the menu
names. Each menu program also includes enough
title "" statements so that the Menus tab is
always the [F8] key.
If menu 1 is currently displayed, then you can switch to menu 2 by pressing [F8], [2] then [ENTER].
(Credit to Andrew Cacovean)
[9.12] Use one Request (in a Dialog box) for more than one variable
The Request command is used in Dialog boxes to get input from the user. However, there is a limit to
the number of Request commands allowed in a Dialog box. In addition, data is naturally entered in
pairs or triplets, such as point coordinates. By using one Request command to get two variables from
the user, you reduce the number of Request commands, and the user can enter the data in a more
natural way.
The two expressions entered by the user are separated by a comma. This program demonstrates the
technique:
req2var()
Prgm
©Demo, get two variables in one Request
©14oct00 dburkett@infinet.com
local s,x,y,xy
©Set default values for x and y
1→x
2→y
©Combine x and y for default prompt
string(x)&","&string(y)→xy
9 - 13