Loops/Do-while: Difference between revisions
Content deleted Content added
m →{{header|Microsoft Small Basic}}: "Each time through the loop, add 1 to the value _then_ print it." |
m →{{header|GW-BASIC}}: "Each time through the loop, add 1 to the value _then_ print it." |
||
Line 1,276:
Equivalent using <code>WHILE</code>:
{{works with|PC-BASIC|any}}
<lang
10 LET I% = 0
20 ' first iteration - before the WHILE
30
40
50 WHILE I% MOD 6 <> 0
60
70
80 WEND
</lang>
Equivalent using <code>GOTO</code>:
{{works with|PC-BASIC|any}}
<lang
10 LET I% = 0
20
30
40 IF I% MOD 6 <> 0 THEN GOTO 20
</lang>
|