Post Reply 
HP42S VARMENU within MENU Exit button challenge
02-20-2018, 04:01 AM
Post: #1
HP42S VARMENU within MENU Exit button challenge
I'm trying to bring up a VARMENU from a main MENU such that exiting the variable menu via the Exit button takes me back to the main menu. I don't want the Exit key to stop the program and leave me stranded without a menu.

The standard technique for nested menus e.g. p37 of the HP42S advanced programming manual says to assign a "jump to the main menu label" in your submenu using the command "KEY 9 GTO ..." (the '9' key is the Exit key). This works with normal sub (menus) but not with varmenus it seems. e.g. line 11 has no effect.

Code:

00 { 100-Byte Prgm }
01▸LBL "nestvar"
02 CLMENU
03 "subm"
04 KEY 1 XEQ "varmen"
05 MENU
06 STOP
07 GTO "nestvar"
08▸LBL "varmen"
09 MVAR "length"
10 MVAR "width"
11 KEY 9 GTO "nestvar"
12 VARMENU "varmen"
13 STOP
14 RCL "length"
15 RCL "width"
16 ×
17 RTN
18 END

Can anyone think of a way of achieving the desired effect? I.e. When looking at the varmenu, I want Exit to take me to the main menu.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP42S VARMENU within MENU Exit button challenge - tcab - 02-20-2018 04:01 AM



User(s) browsing this thread: 1 Guest(s)