Interactive Input In Programs - HP F2226A - 48GII Graphic Calculator User Manual

Graphing calculator
Table of Contents

Advertisement

Note: SQ is the function that results from the keystroke sequence „º.
Save the program into a variable called hv:
³~„h~„v K
A new variable @@@hv@@@ should be available in your soft key menu. (Press J
to see your variable list.) The program left in the stack can be evaluated by
using function EVAL. The result should be 0.228174..., as before. Also, the
program is available for future use in variable @@@hv@@@. For example, for Q =
3
2
0.5 m
/s, g = 9.806 m/s
, b = 1.5 m, and y = 0.5 m, use:
0.5 # 9.806 #1.5 # 0.5 @@@hv@@@
Note: #is used here as an alternative to ` for input data entry.
-2
The result now is 2.26618623518E-2, i.e., hv = 2.26618623518×10
m.
Note: Since the equation programmed in @@@hv@@@ is dimensionally consistent,
we can use units in the input.
As mentioned earlier, the two types of programs presented in this section are
sequential programs, in the sense that the program flow follows a single path,
i.e., INPUT
OPERATION
OUTPUT.
Branching of the program flow is
possible by using the commands in the menu „°@) @ BRCH@ . More detail on
program branching is presented below.

Interactive input in programs

In the sequential program examples shown in the previous section it is not
always clear to the user the order in which the variables must be placed in the
stack before program execution. For the case of the program @@@q@@@, written as
«
»
Cu n y0 S0 'Cu/n*y0^(5/3)*
S0'
,
Page 21-19

Advertisement

Table of Contents
loading

This manual is also suitable for:

48gii

Table of Contents