HP (Hewlett-Packard) 50g ユーザーズマニュアル

ページ / 887
Page 21-19
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 = 0.5 m
3
/s, g 
= 9.806 m/s
2
, b = 1.5 m, and y = 0.5 m, use: 
0.5 # 9.806 #1.5 # 0.5  
  @@@hv@@@
The result now is 2.26618623518E-2, i.e., hv = 2.26618623518
×10
-2
 m.
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’
»
,
Note: SQ is the function that results from the keystroke sequence „º.
Note: #is used here as an alternative to ` for input data entry.
Note:  Since the equation programmed in 
@@@hv@@@ is dimensionally consistent,
we can use units in the input.