[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Applesoft IF...THEN BUG



>         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.

I guess all of these should do (though probably noone would use the last
version). The Applesoft interpreter is FULL of bugs (after all, it's from
Microsoft...), but in this case I'd rather tip at a problem of BASIC.SYSTEM
(though I can't confirm it positively).
BASIC.SYSTEM uses the TRACE feature of Applesoft to keep track of the program
running. At least early versions of BASIC.SYSTEM crashed the system if you
tried to run a line that began with an illegal token. It was (is?) also very
easy to confuse BASIC.SYSTEM with IF...THEN constructs because the first
instruction after the "THEN" isn't traced.

- Wulf


"Though this be madness, there is method in it." (Shakespeare)
+-------------------------------------+-----------------------+
!  wulf@cip.physik.uni-stuttgart.de   !  Apple // Enthusiast  !
+-------------------------------------+-----------------------+
! Wulf Hofbauer * Heilbronner Str. 12 * W-7146 Tamm * Germany !
!                      Tel. 07141/602518                      !
+-------------------------------------------------------------+