[net.micro.pc] Bug in IBM BASIC Compiler 2.0 found

mdf@osu-eddie.UUCP (Mark D. Freeman) (12/13/85)

In BASIC, appending a $ to a variable name indicates that the variable
represents a string.

In the IBM BASIC Compiler 2.0, you may use labels instead of line numbers.

This is legal:

		ON A GOTO LABEL.1,LABEL.2,LABEL.3
LABEL.1:	'
LABEL.2:	'
LABEL.3:	'

If you make a typo so that one of the labels has a $ appended to it, this 
makes the ON GOTO statement try to GOTO a string variable.  Obviously, no
dice.  However, the compiler can't figure out what is going on, and dies
with an internal error.

Try this at home:

		ON A GOTO LABEL.1,LABEL.2,LABEL.3$
LABEL.1:	'
LABEL.2:	'
LABEL.3:	'

Anybody find any other bugs in this new compiler?



-- 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Mark D. Freeman                     Guest account at The Ohio State University
StrongPoint Systems, Inc.				    mdf@osu-eddie.UUCP
209 Olentangy Street					  Mdf@Ohio-State.CSNET
Columbus, OH  43202-2340		       Mdf%Ohio-State@CSNET-RELAY.ARPA
							 !cbosgd!osu-eddie!mdf
I disclaim even my very existance.
	"This must be one of those gay-arab-biker-shushi bars!" -- Protocol
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>