Input/Output:
|
| Level 1/Argument 1 | Level 1/Item 1 |
|
|
|
|
|
| DO | → |
|
| UNTIL | → |
|
| END | T/F → |
|
|
| |
Example: | The following program counts down from 100 to 0 and leaves the integers 100 to 0 on the stack: |
«100 'A' STO A DO 'A' DECR UNTIL 'A==0' END 'A' PURGE »
See also: END, UNTIL, WHILE
DOERRType: Command
Description: Do Error Command: Executes a
DOERR causes a program to behave exactly as if a normal error has occurred during program execution. The error message depends on the argument provided to DOERR:
• nerror or #nerror display the corresponding
• "error" displays the contents of the string. (A subsequent execution of ERRM returns "error". ERRN returns # 70000h.)
• 0 abandons program execution with an ‘interrupted’ error message (ERRN = #13Fh).
• 0 DOERR is equivalent to pressing −.
Access: | !°LLERROR DOERR | ( °is the | |
Input/Output: |
|
|
|
|
| Level 1/Argument 1 | Level 1/Item 1 |
|
|
|
|
|
| nerror | → |
|
| #nerror | → |
|
| “error” | → |
|
| 0 | → |
| The following |
| |
Example: | program takes a number from the stack and returns an error if the number is | ||
| greater than 10: |
|
«→ X « CASE 'X>10' THEN "X IS TOO BIG" DOERR END END » »
See also: ERRM, ERRN, ERR0
DOLISTType: | Command | |
Description: | Do to List Command: Applies commands, programs, or | |
| The number of lists, n, can be omitted when the first or level 1 argument is any of the following: | |
| • | A command. |
| • | A program containing exactly one command (e.g. « DUP ») |
| • | A program conforming to the structure of a |
| The final argument 1 (or level 1 object) can be a local or global name that refers to a program or | |
| command. | |
| All lists must be the same length l. The program is executed l times: on the ith iteration, n objects | |
| each taken from the ith position in each list are entered on the stack in the same order as in their | |
| original lists, and the program is executed. The results from each execution are left on the stack. | |
| After the final iteration, any new results are combined into a single list. | |
Access: | !°LIST PROCEDURES DOLIST ( °is the |
Full Command and Function Reference