How to use PGMMENU & VARMENU

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Thomas Okken
Posts: 917
Joined: Tue May 02, 2017 5:48 pm
Location: United States
Contact:

Re: How to use PGMMENU & VARMENU

Post by Thomas Okken »

Until the DM42 Programming Tool is updated, you can also use Free42 itself to do the conversion: copy your program text from your text editor, paste it into Free42 (in PRGM mode), then save the resulting program using Export Program. A bit cumbersome but it should get the job done.
whuyse
Posts: 143
Joined: Thu Dec 21, 2017 1:23 pm

Re: How to use PGMMENU & VARMENU

Post by whuyse »

richmit wrote:
Fri Apr 02, 2021 1:34 am
A VARMENU1 function that acted the way the integration variable menu works would be a neat feature.
Actually, in that integration menu, there's another behaviour I'd like to see in VARMENU1: catch EXIT. In the integration menu, pressing EXIT repeatedly will cycle back through the respective menus (INTEG menu -> integration variable menu -> PGMMENU), where the integration variable menu is the one we use VARMENU for.
VARMENU today simply stops upon EXIT. If VARMENU1 would resume program execution instead, we should then be able to distinguish between having chosen a variable and having pressed EXIT:
- Alpha register contains the name of the chosen variable, so it can be empty on EXIT (but that's not what the integration menu does)
- Yet Another Flag
- .. your suggestion here

Cheers, Werner
42S #3249S01123
DM42 #00345
DM41X #01215
Thomas Okken
Posts: 917
Joined: Tue May 02, 2017 5:48 pm
Location: United States
Contact:

Re: How to use PGMMENU & VARMENU

Post by Thomas Okken »

whuyse wrote:
Fri Apr 23, 2021 2:51 pm
If VARMENU1 would resume program execution instead, we should then be able to distinguish between having chosen a variable and having pressed EXIT:
- Alpha register contains the name of the chosen variable, so it can be empty on EXIT
That sounds reasonable...
whuyse wrote:
Fri Apr 23, 2021 2:51 pm
(but that's not what the integration menu does)
?
whuyse
Posts: 143
Joined: Thu Dec 21, 2017 1:23 pm

Re: How to use PGMMENU & VARMENU

Post by whuyse »

I meant: when, in the integration menu, you do not select a variable of integration but EXIT instead, it does not clear the alpha register.
Cheers, Werner
42S #3249S01123
DM42 #00345
DM41X #01215
Thomas Okken
Posts: 917
Joined: Tue May 02, 2017 5:48 pm
Location: United States
Contact:

Re: How to use PGMMENU & VARMENU

Post by Thomas Okken »

Ah, OK. But it doesn't put the variable name in ALPHA when you select an integration variable, either, so that's not really a concern, I think.

I made the change to VARMNU1, so it will be in 3.0.3. BTW, I made it so that it still removes the menu on EXIT, so it performs the equivalent of CLA RUN when EXIT is pressed in addition to removing the menu, not instead of. I'm not 100% sure that's the best thing to do, but it does save an EXITALL call in the most common scenario.
Post Reply