EasyManua.ls Logo

HP 39gII - Page 262

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...
252 Programming
IF SIDES<2 THEN
MSGBOX("Must be >= 2");
END;
UNTIL SIDES>=2;
END;
// specify num times to roll the dice.
VIEWS "Set Rolls",SETROLLS()
BEGIN
REPEAT
INPUT(ROLLS,"Num of Rolls","N = ","Enter
num rolls",10);
FLOOR(ROLLS)
ROLLS;
IF ROLLS<1 THEN
MSGBOX("You must enter a number >= 1");
END;
UNTIL ROLLS>=1;
END;
Plot()
BEGIN
-1
Xmin;
MAX(D1)+1
Xmax;
0
Ymin;
MAX(D2)+1
Ymax;
STARTVIEW(1,1);
END;
The ROLLMANY() routine is another adaptation from a
program presented previously in this chapter. Since you
cannot pass parameters into a program called through a
selection from a custom Views menu, the exported
variables SIDES and ROLLS are used in place of the
parameters that were used in the previous versions.

Table of Contents

Other manuals for HP 39gII

Related product manuals