# HP 48gII User Manual Page 674

Graphing calculator.

stack level 7 to give a title to the input string, and leave stack level 6 empty to
facilitate reading the display, we have only stack levels 1 through 5 to define
input variables.
Input string program for two input values
The input string program for two input values, say a and b, looks as follows:
"
"Enter a and b: " {" :a: :b: " {2 0} V } INPUT OBJ→
«
This program can be easily created by modifying the contents of INPTa. Store
this program into variable INPT2.
Application: evaluating a function of two variables
Consider the ideal gas law, pV = nRT, where p = gas pressure (Pa), V = gas
3
volume(m
), n = number of moles (gmol), R = universal gas constant =
8.31451_J/(gmol*K), and T = absolute temperature (K).
We can define the pressure p as a function of two variables, V and T, as
p(V,T) = nRT/V for a given mass of gas since n will also remain constant.
Assume that n = 0.2 gmol, then the function to program is
T
J
T
p
(
V
,
T
)
. 8
31451
0
2 .
. 1 (
662902
_
)
V
K
V
We can define the function by typing the following program
"
V T '(1.662902_J/K)*(T/V)'
« →
and storing it into variable @@@p@@@.
The next step is to add the input string that will prompt the user for the values
of V and T. To create this input stream, modify the program in @@@p@@@ to read:
"Enter V and T: " {"
:T: " {2 0} V }
«
:V:
INPUT OBJ→ → V T '(1.662902_J/K)*(T/V)'
"
Page 21-25