Page 21-43
Message box output without units
Let’s modify the program
@@@p@@@
once more to eliminate the use of units
throughout it. The unit-less program will look like this:
«
“
Enter V,T,n [S.I.]:
“
{
“
:V:
:T:
:n:
“
{2 0} V }
INPUT OBJ
→
→
V T n
«
V DTAG
T DTAG
n
DTAG
→
V T n
«
“
V=
”
V
→
STR +
“
”
+
“
T=
”
T
→
STR +
“
”
+
“
n=
”
n
→
STR +
“
”
+
‘
8.31451*n*T/V
‘
EVAL
→
STR
“
p=
”
SWAP + + + + MSGBOX
»
»
»
And when run with the input data V = 0.01, T = 300, and n = 0.8, produces
the message box output:
Press
@@@OK@@@
to cancel the message box output.
Relational and logical operators
So far we have worked mainly with sequential programs. The User RPL
language provides statements that allow branching and looping of the
program flow. Many of these make decisions based on whether a logical
statement is true or not. In this section we present some of the elements used
to construct such logical statements, namely, relational and logical operators.
Relational operators
Relational operators are those operators used to compare the relative position
of two objects. For example, dealing with real numbers only, relational
operators are used to make a statement regarding the relative position of two
or more real numbers. Depending on the actual numbers used, such a
Содержание 49g+
Страница 1: ...hp 49g graphing calculator user s guide H Edition 4 HP part number F2228 90006 ...
Страница 197: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 377: ...Page 11 55 Function KER Function MKISOM ...
Страница 457: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 775: ...Page 26 10 the location of the backup battery in the top compartment at the back of the calculator ...
Страница 838: ...Page L 5 ...