BBC BASIC

Andy Armstrong andy at hexten.net
Fri May 26 01:51:43 BST 2006


On 26 May 2006, at 01:32, Peter Corlett wrote:
> DATA is a bugger though, isn't it? Free-form so needs special  
> treatment
> (fortunately within the scope of flex start conditions) and a READ  
> into a
> numeric variable is really a string read with an EVAL. Eww.

 From the parsing point of view it's just quoted or un-quoted strings  
separated by commas isn't it?

Are you planning to duplicate the crazy broken parsing of BASIC 2?

 >L.
    10 READ N$ : IF N$ = "." THEN END
    20 PRINT N$
    30 GOTO 10
    40 DATA "1"+"1", 123+2
    41 DATA "Hello" + ", World", LEN("Foo")
    50 DATA .
 >REN.
 >RUN
1
123+2
Hello
World"
LEN("Foo")
 >

Basically after the first closing quote in an item that starts with a  
quote it silently skips characters until it hits a comma.


-- 
Andy Armstrong, hexten.net



More information about the london.pm mailing list