11-22-2015, 12:31 PM
The problem here is that the IF THEN is now a composed sentence. You must use END IF, to finish it (think of THEN and END IF as { and } in C++).
So your code should be:
Actually, THEN can be omitted, and you can insert many sentences, each in a new line:
Also, you can use Labels (e.g. MyLabel: ) ending them in with a colon (, instead of line numbers (line numbers are just considered labels here).
So your code should be:
Code:
10 FOR l = 1 to 30
IF INKEY$ <> "" THEN GOTO 100: END IF
NEXT l
GOTO 10
100 PRINT "*"
Code:
10 FOR l = 1 to 30
IF INKEY$ <> "" THEN
REM You can put many sentences here
GOTO 100
END IF
NEXT l
GOTO 10
100 PRINT "*"