Programming 253
The program above calls two other user programs:
ROLLDIE() and DICESIMVARS(). ROLLDIE()
appears earlier in this chapter. Here's DICESIMVARS.
Store it into a new user program.
The program
DICESIMVARS
EXPORT ROLLS,SIDES;
EXPORT DICESIMVARS()
BEGIN
10
ROLLS;
6
SIDES;
END;
Press Vto see the
custom app menu. Here
you can set the number of
sides of the dice, the
number of rolls, and
execute a simulation.
After running a simulation,
press
Pto see a
histogram of your
simulation results.