You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LANG.md
+17
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,23 @@ Example:
76
76
20 INPUT A,B
77
77
30 PRINT "The product of ",A," and ",B," is ",A*B
78
78
79
+
### FOR var = expression TO expression (STEP expression) / NEXT I
80
+
81
+
Evaluates the first 'expression' and assigns the result to the index variable
82
+
'var' when entering the loop. Before each iteration, the second expression is
83
+
evaluated and compared to the index variable. If the limit is not exceeded,
84
+
another iteration takes place. At the end of each iteration, the step
85
+
'expression' is evaluated and added to the index variable. If a step 'expression'
86
+
is not provided, the step defaults to `1`.
87
+
88
+
Example:
89
+
90
+
10 PRINT "Squares of integers from 1 to 10"
91
+
20 FOR I = 1 TO 10
92
+
30 PRINT I^2
93
+
40 NEXT I
94
+
50 END
95
+
79
96
### GOSUB expression
80
97
81
98
Evaluates 'expression' and jumps to the corresponding line number after saving the current line number. It may appear with with or without whitespace between `GO` and `SUB`. For example, both `GOSUB 100` and `GO SUB 100` are equivalent.
0 commit comments