How to prompt?

Discussion about the new DM41X calculator
Post Reply
User avatar
waitsee
Posts: 3
Joined: Thu Feb 18, 2021 11:39 pm
Location: Borne

How to prompt?

Post by waitsee »

Hi there,

How to PROMPT for a variable?
I have tried this:
LBL AREA
R=?
CLx
PROMPT
STO 01
x^2
PI
x
RTN
END

This little try out does not show the R=? to add the value.
Between the line number and the R=? and PROMPT there is a little T (to show it is alpha)
User avatar
waitsee
Posts: 3
Joined: Thu Feb 18, 2021 11:39 pm
Location: Borne

Re: How to prompt?

Post by waitsee »

OK solved.
I added the PROMPT in Aplha mode. It must be XEQ PROMPT.
Thank You.
grsbanks
Posts: 1073
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: How to prompt?

Post by grsbanks »

Some of that confusion can be avoided by placing quotes around strings that are supposed to be, well, strings rather than commands. So taking your example and making things a little more explicit:

Code: Select all

LBL "AREA"
"R=?"
CLx
PROMPT
STO 01
x^2
PI
x
RTN
END
Also, minor issue, if RTN is the final instruction then you don't need to include it. END does an implicit RTN (says he after just suggesting that some things be made more explicit...)
There are only 10 kinds of people in the world: those who understand binary and those who do not.
User avatar
waitsee
Posts: 3
Joined: Thu Feb 18, 2021 11:39 pm
Location: Borne

Re: How to prompt?

Post by waitsee »

Thx grsbanks. I will follow your tip.
Post Reply