HP (Hewlett-Packard) 50g Calculator User Manual


 
Page 21-28
The lists in items 4 and 5 can be empty lists. Also, if no value is to be
selected for these options you can use the NOVAL command
(„°L@)@@IN@@ @NOVAL@).
After function INFORM is activated you will get as a result either a zero, in case
the @CANCEL option is entered, or a list with the values entered in the fields in the
order specified and the number 1, i.e., in the RPN stack:
Thus, if the value in stack level 1 is zero, no input was performed, while it this
value is 1, the input values are available in stack level 2.
Example 1
- As an example, consider the following program, INFP1 (INput
Form Program 1) to calculate the discharge Q in an open channel through
Chezy’s formula: Q = C(RS)
1/2
, where C is the Chezy coefficient, a function
of the channel surface’s roughness (typical values 80-150), R is the hydraulic
radius of the channel (a length), and S is the channel bed’s slope (a
dimensionless numbers, typically 0.01 to 0.000001). The following program
defines an input form through function INFORM:
« “ 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 »
In the program we can identify the 5 components of the input as follows:
1. Title: “ CHEZY’S EQN”
2. Field definitions: there are three of them, with labels “C:”, “R:”, “S:”,
info strings “Chezy coefficient”, “Hydraulic radius”, “Channel bed
slope”, and accepting only data type 0 (real numbers) for all of the
three fields:
{ { “C:” “Chezy’s coefficient” 0} { “R:” “Hydraulic
radius” 0 } { “S:” “Channel bed slope” 0} }
2: {v
1
v
2
… v
n
}
1: 1