Microsoft KB Archive/35329

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 14:14, 21 July 2020 by X010 (talk | contribs) (Text replacement - "&" to "&")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


BUG: Decimal Math QuickBasic, PRINT USING <Long Int> Gives 0

Article ID: 35329

Article Last Modified on 11/21/2006

This article was previously published under Q35329

SYMPTOMS

In Microsoft QuickBasic (d) (decimal-math version) Version 1.00, when a variable of long integer type is printed with a PRINT USING statement, incorrect (or zero) values are printed. This problem occurs only in the decimal-math interpreter.

Microsoft has confirmed this to be a bug in Microsoft QuickBasic (d) Version 1.00. We are researching this problem and will post new information as it becomes available.

This problem does not occur in a compiled decimal-math program or in the binary-math QuickBasic (b) compiler or interpreter.

MORE INFORMATION

The following program incorrectly prints the long-integer variable (a&) as 0 (zero) in Microsoft QuickBasic (d) interpreter, but correctly prints "123456789" when compiled:

   a& = 123456789&
   PRINT USING "##########";a&
                

(Appending ampersand (&) to a variable name makes it a long integer.)

To work around the problem in decimal math QuickBasic interpreter, you can assign the long integer variable to a single- or double-precision temporary variable, which can be successfully printed with the PRINT USING statement, as follows:

   a& = 123456789&
   temp# = a&
   PRINT USING "##########";temp#
                


Additional query words: MQuickB

Keywords: kbbug KB35329