HP Forums

Full Version: VARMENU on HP42S
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am investigating what appears to me to be a minor anomaly in the way that VARMENU works on the HP42S. Normally pressing a menu key in a VARMENU equipped program without prior data entry results in the program continuing execution. The continuing program can use the variable name which is passed in the Alpha Register. This works fine except in one situation. If a menu key is pressed on first entry to the program without any data entry, the continuing program code is not executed. Instead the value of the variable is presented in a typical VIEW formatted output. Subsequent key presses proceed normally.

I am keen to know if there is a purpose to this observed behavior. More importantly I would like know if there is a work-around other than pressing a menu key twice on first entry to a program if the intention is to immediately execute user’s code.

The following program should illustrate the issue:

Code:
01>LBL "MN2"
02 MVAR "XX"
03 MVAR "YY"
04>LBL 30
05 VARMENU "MN2"
06 PROMPT
07 ASTO ST X
08 "XX"
09 ASTO ST Y
10 X=Y?
11 GTO 11
12 "YY"
13 ASTO ST Y
14 X=Y?
15 GTO 12
16>LBL 11
17 "XX=="
18 ARCL ST X
19 GTO 30
20>LBL 12
21 "YY=="
22 ARCL ST X
23 GTO 30
24 .END.
Reference URL's