Closed cheveron closed 2 years ago
This ticket combines previous tickets #95, #94, #93 and #92.
Before a line is tokenized, it should be parsed and substitutions made in the following cases to convert MS BASIC syntax to SE BASIC syntax:
RND(*)
RND
*
ELSE
:ELSE
=>
>=
=<
<=
><
<>
FNa
FN a
a
THEN n
THEN GOTO n
n
&h
$
&o
@
?
PRINT
&
AND
~
NOT
|
OR
!filename
RUN "filename"
[
(
]
)
TRON
TRACE ON
TROFF
TRACE OFF
HEX$(n)
STR$(n,16)
OCT$(n)
STR$(n,8)
COLOUR
COLOR
SPACE$(n)
STRING$(n,32)
It's done and working, but horribly inefficient. Needs refactoring before merging into the main branch.
Code clean up complete. Needs relocating from screen 40 section, but is good enough to include.
This ticket combines previous tickets #95, #94, #93 and #92.
Before a line is tokenized, it should be parsed and substitutions made in the following cases to convert MS BASIC syntax to SE BASIC syntax:
RND(*)
toRND
where*
is any value.ELSE
to:ELSE
.=>
to>=
.=<
to<=
.><
to<>
.FNa
toFN a
wherea
is an alphabetical character.THEN n
toTHEN GOTO n
wheren
is a numerical character.&h
to$
.&o
to@
.?
toPRINT
.&
toAND
.~
toNOT
.|
toOR
.!filename
toRUN "filename"
.[
to(
.]
to)
.TRON
toTRACE ON
.TROFF
toTRACE OFF
.HEX$(n)
toSTR$(n,16)
.OCT$(n)
toSTR$(n,8)
.COLOUR
toCOLOR
.SPACE$(n)
toSTRING$(n,32)
.