BBC Basic
Code:REM 1-10 printing REM written by Ada Skyla-Rose REM =================== FOR i = 1 TO 10 PRINT i NEXT i ENDPROC END
BBC Basic
Code:REM 1-10 printing REM written by Ada Skyla-Rose REM =================== FOR i = 1 TO 10 PRINT i NEXT i ENDPROC END
Double Helix STL
This won't run in BBC BASIC since you haven't defined the procedure. Remove the ENDPROC and it will work - or define the procedure. This will work in BBC BASIC for Windows:
...as will the REPEAT...UNTIL loop in BBC BASIC that I posted earlier on in this thread.Code:PROC_loop PRINT PRINT "THE END." END DEF PROC_loop FOR I=1 TO 10 PRINT I; NEXT I ENDPROC
May as well add the WHILE...ENDWHILE loop way of doing this in BBC BASIC
Code:REM WHILE...ENDWHILE loop BBC BASIC (BBC BASIC for Windows & BBC BASIC V) a%=0 WHILE a%<10 a%+=1 PRINT a% ENDWHILE END