HP 39gII User Manual page 277

Graphing calculator
Hide thumbs Also See for 39gII:
Table of Contents

Advertisement

Replace the PRINT command in the previous example
with the MSGBOX command to:
EXPORT AREACALC()
BEGIN
LOCAL radius;
INPUT(radius, "Radius of Circle",:"r =
","Enter radius",1);
π
MSGBOX("The area is "
+ *radius^2);
END;
If the user enters 10 for the
radius, the message box
shows this:
CHOOSE
Syntax:CHOOSE(var, "title", "item1", "item2",...,"itemn")
Displays a choose box with the given title and containing
the choose items. If the user selects an object, the variable
whose name is provided will be updated to contain the
number of the selected object (an integer, 1, 2, 3, ...) or
0 if the user presses
.
Returns true (non zero) if the user selects an object,
otherwise return false (0).
Example:
CHOOSE(N,"Pick
Hero","Euler","Gauss","Newton");
IF N==1 PRINT("You picked Euler");END
ELSE IF N==2
PRINT("You picked
Gauss");END
ELSE IF N==3
PRINT("You picked
Newton");END
END;
After execution of CHOOSE, the value of n will be updated
to contain 0, 1, 2, or 3. The IF THEN ELSE command
Programming
267

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents