I wasn't familiar with QuickBASIC at that time, so I didn't use Microsoft's syntax for this. Instead I used square brackets for branch labels like so:
[loopHere]
a = a + 1
print a
if a = 10 then [quit]
goto [loopHere]
[quit]
print "done."
end
Liberty BASIC programmers will recognize this syntax. I called this preprocessor SBASIC for Structured BASIC.
Here's what it looks like in QuickBASIC:
loopHere:
a = a + 1
print a
if a = 10 then quit
goto loopHere
quit:
print "done."
end
I think that my syntax is better. It certainly is more consistent because in QuickBASIC the branch label will either be quit or quit: but in SBASIC it is always [quit].
So here we see a direct precursor to Liberty BASIC. At this time I did not have plans to create my own BASIC. That wouldn't come for four more years.
No comments:
Post a Comment