Loops/While: Difference between revisions
Added MSX Basic
m (→{{header|GW-BASIC}}: Lowered header level.) |
(Added MSX Basic) |
||
Line 872:
{{works with|Commodore BASIC}}
{{works with|Nascom ROM BASIC|4.7}}
<syntaxhighlight lang="gwbasic">10 REM Loops/While
20 LET I = 1024
40 IF I <= 0 THEN 80
Line 879 ⟶ 878:
60 LET I = INT(I/2)
70 GOTO 40
80 END</syntaxhighlight>
</syntaxhighlight>▼
==={{header|MSX Basic}}===
There is no <code>WHILE</code> construct in MSX Basic. A <code>GOTO</code> construct is used instead.
<syntaxhighlight lang="qbasic">10 I% = 1024
20 IF I% = 0 THEN END
30 PRINT I%
40 I% = I%/2 : rem INT(I/2)
▲50 GOTO 20</syntaxhighlight>
Solutions [[#GW-BASIC|GW-BASIC]] and [[#Minimal _BASIC|Minimal BASIC]] work without changes.
==={{header|Nascom BASIC}}===
|