(Untitled)

Oct 16, 2008 23:47

Oh, thank heavens I'm not the only one who noticed the bug in WIRED. Go ahead, read the code and see if you can spot the problem. As a veteran of Atari BASIC, I frowned instantly.

The article, Why Veteran Visionaries Will Save the World (printed as "The Ages of Innovation"), is about chronological age and technology leadership.


Read more... )

programming, wired magazine, atari basic

Leave a comment

Comments 9

hitchkitty October 17 2008, 04:07:46 UTC
Well, unless I'm greatly mistaken, entering "425" would result in "WELCOME, CEO!"

Reply

sylvar October 17 2008, 04:23:39 UTC
Son of a bitch... well played!

Hands up if you spotted the *other* bug.

Reply

hitchkitty October 17 2008, 11:08:42 UTC
Well, I hadn't been entirely sure, but I don't think you can enter a value for A$. Which means the program will always print "SORRY! GOODBYE." immediately after asking for the user's age.

Reply

sylvar October 17 2008, 14:29:00 UTC
Right. It should be 10 INPUT "prompt?", A$.

Reply


datan0de October 17 2008, 11:59:37 UTC
Cripes. I've never programmed on an Atari but did spend an embarrassing percentage of my childhood playing with Commodore 64 BASIC, which is close enough to Atari BASIC to know the difference between PRINT and INPUT.

Also, shouldn't it be "A" instead of "A$"? Can Atari BASIC process a string variable as a numerical value?

Reply

sylvar October 17 2008, 14:55:28 UTC
Yes. It should be 20 IF VAL(A$) < 30 THEN GOTO 60.

Reply


srmm October 17 2008, 13:32:35 UTC
See, and I looked at it and thought, "I don't know enough about Atari basic to know what's allowable and what's not, or how stuff is interpreted, but it looks ok to me", which is obviously what happened to the poor sod who wrote it.

Reply


hapgood October 19 2008, 15:37:38 UTC
shouldn't line 10 be an input statement, not a print statement?

Reply

sylvar October 19 2008, 22:49:55 UTC
yup, and there are other problems too -- such as integer/string comparison.

Reply


Leave a comment

Up