Microsoft KB Archive/140293

= FIX: Missing Closing Parenthesis Acts Like a Comment =

Article ID: 140293

Article Last Modified on 3/24/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q140293



SYMPTOMS
When you use the parenthesis symbol to enclose conditions to be evaluated and leave off the leading parenthesis, the closing parenthesis acts like a comment marker as if it were a double ampersand (&&). Any code that follows the closing parenthesis is ignored when the program is executed.

Visual FoxPro should give an error message when the opening parenthesis is missing, but in this case it does not.



RESOLUTION
Make sure that the closing parenthesis has a matching opening parenthesis.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0 for Windows.



Steps to Reproduce Problem
Place the following code in a .prg file: a = .T.  b = .T.   c = .F.   IF a AND b) AND c      WAIT WINDOW "This expression must be true."   ENDIF The IF statement should not evaluate to true because the variable "c" is false. The wait window box shows up because the closing parenthesis does not allow FoxPro to see the rest of the statement. If the closing parenthesis is taken out or if a opening parenthesis is added, then the wait window box will not appear.

Keywords: kbbug kbfix kbvfp500fix KB140293

-

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

© Microsoft Corporation. All rights reserved.