KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q59398: PRINT Ignored After PRINT CURRENCY Variable in QBX.EXE 7.00

Article: Q59398
Product(s): See article
Version(s): 7.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist7.00 fixlist7.10 | mspl13_basic
Last Modified: 20-SEP-1990

The program below demonstrates a problem with executing a PRINT
statement to produce a blank line.

After printing a variable or array element that has been dimensioned
as a CURRENCY data type, a blank line cannot be produced by issuing a
successive PRINT. This problem occurs only within the QBX.EXE
environment, and does not occur with programs compiled with BC.EXE.

Microsoft has confirmed this to be a problem in the QBX.EXE
environment of Microsoft BASIC Professional Development System (PDS)
version 7.00 for MS-DOS. This problem was corrected in BASIC PDS
version 7.10.

Code Example
------------

   DIM A AS CURRENCY
   A = 10
   PRINT A
   PRINT
   PRINT "Where did the space go?"
   END

Output
------

   10
   Where did the space go?

Workaround Code Example
-----------------------

Each additional PRINT statement will correctly produce a blank line,
as shown in the following program:

   DIM A AS CURRENCY
   A = 10
   PRINT A
   PRINT
   PRINT
   PRINT "A blank line was printed"

Output
------

   10

   A blank line was printed

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.