Content deleted Content added
+see also |
→Statements: +FOR |
||
Line 36:
| Halt execution of the program.
|-
| <code>
| Perform a set of statements repeatedly for varying values of ''var''
|-
| <code>GOSUB ''line''</code>
| Call a subroutine at a given line number; flow would return to the next statement when a <code>RETURN</code> was executed.
|-
| <code>GOTO ''line''</code>
| Unconditional branch to a given line number.
|-
| <code>IF
| Conditionally branch. The <code>THEN</code> and <code>ELSE</code> parts could only give line numbers to go to.
|-
| <code>INPUT ''var''</code>
| Prompt the user for input data
|-
| <code>LET ''var''=''expr''</code>
| Assign a value to a variable. Unlike many modern dialects of BASIC, <code>LET</code> not an optional word.
|-
| <code>NEXT ''var''</code>
| Perform the next iteration of a <code>FOR</code> loop.
|-
| <code>PRINT</code>
| Output to the teletype
|-
| <code>READ ''var''...</code>
| Read data from <code>DATA</code> statements into variables
|-
Line 60 ⟶ 66:
| Short for <code>REM</code>ark, this allowed for a comment to be placed on a line
|-
| <code>RESTORE [''line'']</code>
| Reset the <code>READ</code> pointer in order to re-read <code>DATA</code>
|-
|