Microsoft KB Archive/57374

= BUG: Boolean Expression Using VAL Function Returns Wrong Value =

Article ID: 57374

Article Last Modified on 11/21/2006



This article was previously published under Q57374



SYMPTOMS
A Boolean expression returns an incorrect value if the VAL function is part of the Boolean expression.

This problem applies only to the binary version of Microsoft QuickBasic Version 1.00 for the Macintosh.

To work around this problem, first evaluate the VAL function and assign this to a temporary variable. You can then use the temporary variable in the Boolean expression.

Microsoft has confirmed this to be a bug in Microsoft QuickBasic for the Macintosh Version 1.00. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Code Example
The following code example demonstrates the problem: a$ = &quot;3.33&quot; variable! = 3.33  PRINT (variable! = VAL(a$))

OUTPUT --> 0 The following code is a possible workaround: a$ = &quot;3.33&quot; variable! = 3.33  temp! = VAL(a$) PRINT (variable! = temp!)

OUTPUT --> -1

Additional query words: MQuickB

Keywords: kbbug KB57374

-

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

© Microsoft Corporation. All rights reserved.