Menu

#139 Compile error when source does NOT end with <CR>+<LF>

open
nobody
None
5
2010-02-12
2010-02-12
Tracey
No

08JAN09
Compile error "sometimes" when source does NOT end with <CR><LF>
Consistanly when the RETURN statement is the last statement (both "main" programs and SUBROUTINEs):
TEST
001 GOSUB ONE
002 STOP
003
004 ONE:; !>
005 CRT 'GOSUB ONE'
006 RETURN

D:\mvdemo>BASIC TEST
Error: line: 0 178RETURN
==========================================================
Compile/run works with last <CR><LF> after RETURN statement:
TEST
001 GOSUB ONE
002 STOP
003
004 ONE:; !>
005 CRT 'GOSUB ONE'
006 RETURN
007

D:\mvdemo>BASIC TEST
D:\mvdemo>RUN TEST
GOSUB ONE

Discussion


Log in to post a comment.

MongoDB Logo MongoDB