DATA is easy - it's the same as REM - you skip over the line at run time, no parsing, nothing. Prefer putting the DATA at the end to help improve GOTO speeds, etc. as was the case in other Basics so it's never executed anyway.
RESTORE is just as easy (set the data pointer to the start of the program text - need to do on RUN and CLEAR too)
But then READ.
(Note for the following: There are no real arrays in my TinyBasic; the ? operator is poke byte - so ?(A+4) = 42 means poke 42 into the address represented by the value of A plus 4)
Classic Basic has it looking like:
Code: Select all
READ VHowever in (my) TinyBasic world it would be just as easy to use
Code: Select all
V = READFilling an array the "classic" way:
Code: Select all
FOR I = 0 TO 9 : READ V : ?(A+I) = V : NEXT ICode: Select all
FOR I = 0 TO 9 : ?(A+I) = READ : NEXT ICode: Select all
READ ?(A+I)Code: Select all
READ A(I)Any thoughts or opinions?
Cheers,
-Gordon