Prompt with an input string, Prompt with an input string ,21-21 – HP 50g Graphing Calculator User Manual
Page 668
Page 21-21
which indicates the position of the different stack input levels in the formula. By
comparing this result with the original formula that we programmed, i.e.,
we find that we must enter y in stack level 1 (S1), b in stack level 2 (S2), g in
stack level 3 (S3), and Q in stack level 4 (S4).
Prompt with an input string
These two approaches for identifying the order of the input data are not very
efficient. You can, however, help the user identify the variables to be used by
prompting him or her with the name of the variables. From the various methods
provided by the User RPL language, the simplest is to use an input string and the
function INPUT („°L
@)@@IN@@ @INPUT@) to load your input data.
The following program prompts the user for the value of a variable a and places
the input in stack level 1:
«
“Enter a: “ {“ :a: “ {2 0} V } INPUT OBJ→
»
This program includes the symbol :: (tag) and (return), available through the
keystroke combinations „ê and ‚ë, both associated with the .
key. The tag symbol (::) is used to label strings for input and output. The return
symbol ( ) is similar to a carriage return in a computer. The strings between
quotes (“ “) are typed directly from the alphanumeric keyboard.
Save the program in a variable called INPTa (for INPuT a).
Try running the program by pressing the soft menu key labeled
@INPTa.
,
)
1
2
(
3
2
4
2
2
S
S
S
S
⋅
⋅
⋅
,
)
(
2
2
2
by
g
Q
h
v
=