EasyManuals Logo

HP 50G User Manual

HP 50G
887 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #679 background imageLoading...
Page #679 background image
Page 21-32
Activation of the CHOOSE function will return either a zero, if a @CANCEL action
is used, or, if a choice is made, the choice selected (e.g., v) and the number 1,
i.e., in the RPN stack:
Example 1
– Manning’s equation for calculating the velocity in an open
channel flow includes a coefficient, C
u
, which depends on the system of units
used. If using the S.I. (Systeme International), C
u
= 1.0, while if using the E.S.
(English System), C
u
= 1.486. The following program uses a choose box to let
the user select the value of C
u
by selecting the system of units. Save it into
variable CHP1 (CHoose Program 1):
« “Units coefficient” { { “S.I. units” 1}
{ “E.S. units” 1.486} } 1 CHOOSE »
Running this program (press @CHP1) shows the following choose box:
Depending on whether you select
S.I. units or E.S. units, function
CHOOSE places either a value of 1 or a value of 1.486 in stack level 2 and a
1 in level 1. If you cancel the choose box, CHOICE returns a zero (0).
The values returned by function CHOOSE can be operated upon by other
program commands as shown in the modified program CHP2:
« “Units coefficient” { { “S.I. units” 1} { “E.S. units”
1.486} } 1 CHOOSE IF THEN “Cu” TAG ELSE “Operation
cancelled” MSGBOX END »
The commands after the CHOOSE function in this new program indicate a
decision based on the value of stack level 1 through the IF-THEN-ELSE-END
construct. If the value in stack level 1 is 1, the commands “Cu” TAG will
produced a tagged result in the screen. If the value in stack level 1 is zero, the
2: v
1: 1

Table of Contents

Other manuals for HP 50G

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 50G and is the answer not in the manual?

HP 50G Specifications

General IconGeneral
Digits33 digits
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)87 x 184 x 23.5 mm

Related product manuals