Microsoft KB Archive/39589

= BUG: Extra $ with PRINT USING &quot;$$&quot; Format in Mac QuickBasic =

Article ID: 39589

Article Last Modified on 11/21/2006



This article was previously published under Q39589



SYMPTOMS
Within the interpreter of Microsoft QuickBasic Version 1.00 for the Macintosh, the floating dollar sign (&quot;$$&quot;) format of the PRINT USING statement does not work correctly when multiple variables are used in the argument list. The problem does not occur in compiled programs.

The code example below demonstrates the problem. If the first argument uses the floating dollar sign (&quot;$$&quot;) in the format string, any subsequent arguments are incorrectly displayed with the floating dollar sign.

A workaround for this problem is to break up the PRINT USING statement into several PRINT USING statements so that each has only one argument.

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



MORE INFORMATION
The following code example shows the problem: x = 0: y = 1 PRINT USING &quot;$# ##&quot;; x, y    ' Not a floating dollar problem. PRINT USING &quot;$$### ##&quot;; x, y ' This is a floating dollar problem. The program above gives the following output: $0 1             < Output OK. $0 $1         < Problem: Should be no $ on second argument. A workaround is to print the variables in separate PRINT USING statements: PRINT USING &quot;$$###&quot;; x;      ' These two will work. Use semi-colon PRINT USING &quot;##&quot;; y          ' to concatenate output. WHILE INKEY$ = &quot;&quot; WEND The following is the output from the above workaround:   $0  1

Additional query words: MQuickB

Keywords: kbbug KB39589

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.