Date : Wed, 07 Jan 2004 01:51:22 +0000
From : jgh@... (Jonathan Graham Harston)
Subject: Re: BBC BASIC4 - Comments in DATA statements!
Steve Fewell <kranser@...> wrote:
> Was anyone aware that it is possible to include
> comments in DATA statements - not that it's much use
> on the Beeb, with the lack of memory!
>
> 50 DATA 12.50 (This is the Wage), 6.0 (This is the
> Number of hours), 42 (This is the age)
Not only can you include comments in data statements, you can include data
in comments! See:
DATA 12.50:REM Wages,6.0:REM Hours,42:REM Age
As you found out, the data parser scans forward for a comma ignoring
anything in between. This means it ignores REMs! As a DATA statement is
treated as a REM when executed, it doesn't fall over. Try:
REM Hello:PRINT "Hello"
--
J.G.Harston (JGH BBC PD Library) 70 Camm Street, Walkley, SHEFFIELD S6 3TR
jgh@... - Running on BBCs & Masters with SJ MDFS FileServer
Z80+6502/CoPro+Tubes/Econet+SJ - - - - - - - http://www.mdfs.net/User/JGH/