ZEROGROB | Creates a blank graphic with given width and height, |
| and stores it in graphicname. |
| ZEROGROB graphicname;width;height: |
Loop hp allow a program to execute a routine repeatedly. The HP 39gs has three loop structures. The example programs below illustrate each of these structures incrementing the variable A from 1 to 12.
DO…UNTIL …END Do ... Until ... End is a loop command that executes the
DO
1 A:
DO
| A + 1 | A |
| DISP 3;A: | |
| UNTIL A == 12 END: | |
WHILE… | While ... Repeat ... End is a loop command that | |
REPEAT… | repeatedly evaluates | |
END | sequence if the test is true. Because the | |
| executed before the | |
| executed if the test is initially false. Its syntax is: | |
| WHILE | |
| 1 A: |
|
| WHILE A < 12 REPEAT | |
| A+1 A |
|
| DISP 3;A: | |
| END: |
|
FOR…TO…STEP | FOR | |
...END | [STEP increment]; | |
| END | |
| FOR A=1 TO 12 STEP 1; |
DISP 3;A:
END:
Programming |