The START 7 NEXT Structure
The syntax for this structure is
«… start finish START
START … NEXT executes the
Syntax | Flowchart |
|
Start | 1:Start |
|
finish | 2:finish |
|
START | counter=start |
|
| Store finish |
|
Body of loop |
| |
| counter = counter + 1 |
|
NEXT |
|
|
| Is | yes |
| counter ≤ finish? | |
|
|
no
START 7 NEXT Structure
START takes two numbers (start and finish) from the stack and stores them as the starting and ending values for a loop counter. Then, the
To enter START 7 NEXT in a program:
Press !°%BRCH% !%START%.
Example: The following program creates a list containing 10 copies of the string "ABC":
«1 10 START "ABC" NEXT 10 →LIST »