[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Applesoft IF...THEN Bug?
While fooling around with Applesoft today (during those dull periods in my
software tech support job), I discovered something odd. According to the
Applesoft Programmer's Reference Manual, when an IF...THEN test is true,
and the desired action is to transfer control to another line, this
statement may be written any of three ways:
IF B THEN GOTO 100
IF B THEN 100
IF B GOTO 100
The manual says that all of these statements have a valid syntax. But when
I try "IF B GOTO 100" (and yes, there really is a line 100 somewhere), I
get an undefined statement error! Replacing the GOTO with THEN or THEN GOTO
will allow a successful run.
So what's the deal here? I can't find any tech note which contradicts the
Reference Manual, but I can definitely confirm that IF...(THEN) GOTO
doesn't work. I've probably never encountered this problem before, because
I wisely use an ON...GOTO statement whenever possible, to save a few bytes.