Post Reply 
VARMENU on HP42S
04-26-2016, 04:17 AM
Post: #1
VARMENU on HP42S
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.
Find all posts by this user
Quote this message in a reply
Post Reply 




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