[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: running .system files from BASIC
Don Bruder (dakidd@sonic.net) wrote:
: In article <LfqdnZdcsZ_xJO3dRVn-iQ@comcast.com>,
: "Bill Garber" <willy46pa@comcast DOT net> wrote:
: > You need the Semi-Colon after D$ otherwise
: > it'll think D$"-xxxxxxxx.SYSTEM" is all one
: > variable.
: I'm not going to swear to it, but I think that's incorrect. Seems to me
: I remember writing code either way, since Applesoft didn't care whether
: the semicolon was there or not.
: There were a couple special cases that I can't recall right now (mostly
: involving unexpected ways the parser saw things) that made it a really
: good idea to use the semicolon between items in a print list, but aside
: from the "gotcha" cases, I'm pretty sure it's optional.
I've never seen problems like that with this form of print statement. But
I have seen oddball problems when the parser would do exactly as I told it
instead of what I wanted it to do. Consider this:
nnn IF B = A THEN 40
...will result in a ?SYNTAX ERROR while...
nno IF A = B THEN 40
...will work fine. Reading the listing reveals all:
LIST nnn-nno
nnn IF B = AT HEN 40
nno IF A = B THEN 40
There are other situations where using a particular variable name can
cause the parser to misread the variable name as part of a reserved word.
It's because the Applesoft parser is programmer-friendly and doesn't care
about such things as spaces and certain punctuation. The easiest way to
stay out of trouble is to use two-byte variable names (although certain
ones...AT, FN, GR, IF, ON, OR, and TO are Applesoft reserved words.
Oddly enough, FP is a DOS command and therefore not a reserved word...)
which fill the parser's variable space and prevent it from tacking on the
first byte from the next token.
I just looked up the reserved words in the Applesoft ][ BASIC Programming
Reference Manual, but because I am at work, I don't have an Apple ][
handy...I just saw something else in here. It says...
(minimum line number is 0, maximum is 65529)
Now wait a minute...I thought the highest allowable Applesoft line number
was 63999...anybody know for sure?
--Dave Althoff, ][.
Whose collection of utility subroutines start at 60000...
--
/X\ _ _ *** Closed for the season. ***
/XXX\ /X\ /X\_ _ /X\__ _ _ _____
/XXXXX\ /XXX\ _/XXXX\_ /X\ /XXXXX\ /X\ /X\ /XXXXX
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX