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=" |
<syntaxhighlight lang="basic">10 REM Loops/While |
||
LET I = 1024 |
|||
20 LET I = 1024 |
|||
30 IF I <= 0 THEN GOTO 70 |
|||
40 PRINT I |
|||
LET I = I / 2 |
|||
50 LET I = I / 2 |
|||
60 GOTO 30 |
|||
70 END</syntaxhighlight> |
|||
{{out}} |
{{out}} |
||
<pre> |
<pre> |