Loops/While: Difference between revisions

Content added Content deleted
(→‎{{header|BASIC}}: Clarified implementation of BASIC.)
m (→‎{{Header|Tiny BASIC}}: Works with (Tom Pittman's) TinyBasic.)
Line 932: Line 932:
==={{Header|Tiny BASIC}}===
==={{Header|Tiny BASIC}}===
Tiny BASIC have no <code>while</code> construct. Equivalent using conditional jump:
Tiny BASIC have no <code>while</code> construct. Equivalent using conditional jump:
{{works with|TinyBasic}}
<syntaxhighlight lang="tinybasic"> REM Loops/While
<syntaxhighlight lang="basic">10 REM Loops/While
LET I = 1024
10 IF I <= 0 THEN GOTO 20
20 LET I = 1024
30 IF I <= 0 THEN GOTO 70
PRINT I
40 PRINT I
LET I = I / 2
GOTO 10
50 LET I = I / 2
60 GOTO 30
20 END</syntaxhighlight>
70 END</syntaxhighlight>
{{out}}
{{out}}
<pre>
<pre>