Interactive Input In Programs - HP 50g User Manual

Graphing calculator
Hide thumbs Also See for 50g:
Table of Contents

Advertisement

Note: SQ is the function that results from the keystroke sequence „º.
Save the program into a variable called hv:
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 = 0.5 m
2
= 9.806 m/s
, b = 1.5 m, and y = 0.5 m, use:
Note: #is used here as an alternative to ` for input data entry.
The result now is 2.26618623518E-2, i.e., hv = 2.26618623518 10
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
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
³~„h~„v K
0.5 # 9.806 #1.5 # 0.5 @@@hv@@@
OUTPUT. Branching of the program flow is
«
Cu n y0 S0 'Cu/n*y0^(5/3)* S0'
3
/s, g
-2
m.
»
,
Page 21-19

Advertisement

Table of Contents
loading

Table of Contents