[comp.sys.ibm.pc] Bug in PRINT USING in Basic

rosenblum@draco.rutgers.edu (02/01/89)

I have found a bug in the PRINT USING statement in Basic for the IBM-PC 
by Microsoft.  I am running DOS 3.10 -- the header that comes up when I 
go into Basic says that I am running Version D3.10, with copyright dates 
1981, 1985, although my Basic manual says that I have 1.10.  Anyway, the 
bug is that

PRINT USING "##.##########"; 0.001

prints

 0.0001000000

on the screen (note the extra zero between the decimal point and the 1).
If I allow only nine places to the right of the decimal point, this does 
not happen, but if I allow ten or more and print out a small enough 
number (I haven't tested to see how small small enough is), it divides 
the number by 10.

I presume that I'm not the first person to discover this.  Is there a 
work-around or a fix?  Thanks in advance.

Daniel M. Rosenblum, Assistant Professor, Quantitative Studies,
   Graduate School of Management, Rutgers University (Newark)

BITnet: ROSENBLUM@ZODIAC or ROSENBLUM@DRACO
Internet: ROSENBLUM@CANCER.RUTGERS.EDU or ROSENBLUM@DRACO.RUTGERS.EDU
Internet with old ARPANET NIC host tables:
   ROSENBLUM%CANCER.RUTGERS.EDU@RUTGERS.EDU or
   ROSENBLUM%DRACO.RUTGERS.EDU@RUTGERS.EDU

brown@nicmad.UUCP (Vidiot) (02/02/89)

In article <2020@galaxy> rosenblum@draco.rutgers.edu writes:
<I have found a bug in the PRINT USING statement in Basic for the IBM-PC 
<by Microsoft.  I am running DOS 3.10 -- the header that comes up when I 
<go into Basic says that I am running Version D3.10, with copyright dates 
<1981, 1985, although my Basic manual says that I have 1.10.

You don't really which BASIC this is, ie, the BASIC that comes with DOS,
QuickBASIC or MS BASIC Compiler.

If you are using the BASIC that comes with DOS, I'm afraid that I can't
help as I use the QuickBASIC version of BASIC.  If so, I would suggest
getting your hands on QuickBASIC.  It is MUCH better than the BASIC that
comes with DOS.  It doesn't need line numbers, has many more commands to
help you with more things, can be compiled into stand-alone code and has
its own built-in editor (works with the mouse).  You can get it mail order
for around $69.00.  A very cheap and very good product.

If you have QuickBASIC, version 1.10, you need to get upgraded to 4.5.
-- 
	       harvard-\	 att--\
Vidiot            ucbvax!uwvax!astroatc!nicmad!brown
	       rutgers-/      decvax--/
	ARPA/INTERNET: brown%nicmad.UUCP@spool.cs.wisc.edu