# HP F2226A - 48GII Graphic Calculator User Manual Page 679

Graphing calculator.

Thus, we demonstrated the use of function INFORM. To see how to use these
input values in a calculation modify the program as follows:
«
" CHEZY'S EQN" { { "C:" "Chezy's coefficient" 0} { "R:"
"Hydraulic radius" 0 } { "S:" "Channel bed slope" 0} } { }
{ 120 1 .0001} { 110 1.5 .00001 }
INFORM IF THEN OBJ
DROP
C R S 'C*(R*S)'
NUM "Q"
TAG ELSE "Operation cancelled"
MSGBOX END "
The program steps shown above after the INFORM command include a
decision branching using the IF-THEN-ELSE-END construct (described in detail
elsewhere in this Chapter). The program control can be sent to one of two
possibilities depending on the value in stack level 1.
If this value is 1 the
control is passed to the commands:
OBJ
DROP
C R S 'C*√(R*S)'
NUM "Q"
TAG
These commands will calculate the value of Q and put a tag (or label) to it.
On the other hand, if the value in stack level 1 is 0 (which happens when a
@CANCEL is entered while using the input box) , the program control is passed to
the commands:
"Operation cancelled" MSGBOX
These commands will produce a message box indicating that the operation
was cancelled.
Note: Function MSGBOX belongs to the collection of output functions under
Commands IF, THEN, ELSE, END are available
under the PRG/BRCH/IF sub-menu. Functions OBJ ,
TAG are available
Function DROP is available under the
and
NUM are available in the keyboard.
Example 2 – To illustrate the use of item 3 (Field format information) in the
arguments of function INFORM, change the empty list used in program INFP1
to { 2 1 }, meaning 2, rather than the default 3, columns, and only one tab
stop between labels and values. Store this new program in variable INFP2:
Page 21-30