EasyManua.ls Logo

HP 39gII - Page 279

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 269
EXPORT DRAWPATTERN()
BEGIN
LOCAL xinc,yinc,color;
STARTAPP("Function");
RECT();
xincr := (Xmax - Xmin)/254;
yincr := (Ymax - Ymin)/110;
FOR X FROM Xmin TO Xmax STEP xincr DO
FOR Y FROM Ymin TO Ymax STEP yincr DO
color := FLOOR(X^2+Y^2) MOD 4;
PIXON(X,Y,color);
END;
END;
FREEZE;
END;
REPEAT…UNTIL… Syntax: REPEAT commands UNTIL test;
Repeats the sequence of commands until test is true (non
0).
This code prompts for a positive value for SIDES,
modifying an earlier program in this chapter.
Example:
EXPORT SIDES;
EXPORT GETSIDES()
BEGIN
REPEAT
INPUT(SIDES,"Die Sides","N = ","Enter
num sides",2);
UNTIL SIDES>0;
END;
WHILE…DO…END Syntax: WHILE test DO commands END;

Table of Contents

Other manuals for HP 39gII

Related product manuals