[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Applesoft IF...THEN Bug?
dlyons@Apple.COM (David A Lyons) writes:
>In article <at80662@pro-ren.cts.com> edward@pro-ren.cts.com (Edward Floden) writes:
>>[...]
>> IF B THEN GOTO 100
>> IF B THEN 100
>> IF B GOTO 100
[The third one wasn't working.]
>All three forms work ne for me! Please post some code that demonstrates
>a problem. Also, are you using BASIC.System (what version?), or DOS 3.3?
>
>Are you using any utilities that patch BASIC in any way?
And, of course, when I'm called upon to replicate the problem, it ain't there!
What I was doing: booting into GS/OS (IIgs System Software 6.0), then
launching BASIC.System 1.5 via a ProSel-16 menu selection. ProDOS 8 version
was 2.0.1.
The code that first exhibited the problem was on the ancient /Examples disk
that accompanies _BASIC Programming in ProDOS_. Specifically, the program
/Examples/Extras/Time, which updates the system clock. The line which first
failed:
550 GET A$: IF (A$ < "0") or (A$ > "3") GOTO 545
Yes, there is a line 545. :) This is a prompt to enter the day of the month.
On the first running of this program, I got the error UNDEF'D STATEMENT ERROR
IN 550. Which, of course, puzzled me. Experimenting with this short program
also displayed the error:
10 X = 1
20 IF X GOTO 100
30 GOTO 10
100 END
The error occurred here in line 20.
Now for the punch line: I can't do it again. This problem was occurring on a
IIgs which I use at work, and the problem even survived several reboots. But
comparing both the ProDOS 8 and BASIC.System files with those on the master
6.0 disks showed no difference: the files were identical. Over the weekend, I
tried these same programs on both of the IIgs at home, which are running the
same combination of system software. No luck; the "bug" wasn't there. And
then, when trying this again on the IIgs at work, you guessed it, the problem
had disappeared.
I suspect, but obviously can't prove yet, that I may have a bad RAM chip in
the work IIgs, and BASIC.System is residing in that area. Unfortunately (?),
the IIgs self-test finds no bad RAM. Go figure.
My apologies to everyone who got excited about nothing. BTW, when does wild
goose season open? I'll think that I'll get a license. :)