EasyManua.ls Logo

HP 39gII - Page 277

HP 39gII
355 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
Loading...
Programming 267
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
π

Table of Contents

Other manuals for HP 39gII

Related product manuals