Changes

Locomotive BASIC

497 bytes added, 12:57, 19 September 2011
/* GOTO i */
30 REM not executed
100 PRINT "Hello World!"
</pre>
: GOTO is the simplest form of a jump or creating a loop '''without''' condition controll.
: ''Example: (unconditional and endless loop)''
<pre>
10 PRINT "#";
20 GOTO 10
</pre>
: Combine the GOTO command with an IF...THEN...ELSE instruction for creating a condition-controlled loop with the '''test at the end'''. Helpful because the Locomotive Basic has no practical DO...WHILE... loop.
: ''Example: (condition at the end)''
<pre>
10 I=1
20 PRINT I
30 I=I+1
40 IF I<25 THEN GOTO 10
50 END
</pre>
205
edits