The information in this article applies to:
SYMPTOMSWhen using the NOT operator in combination with the IF statement, your program may incorrectly jump on the wrong condition. This problem only occurs in compiled programs. WORKAROUND
Some possible workarounds for this problem are listed below:
STATUSMicrosoft has confirmed this to be a bug in the Standard and Professional Editions of Microsoft Visual Basic for MS-DOS, version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
In a compiled program, the IF statement in combination with the NOT
operator works correctly if all expressions assume -1 is a logical TRUE and
0 is a logical FALSE. Normally Basic assumes any non-zero value to be a
logical TRUE. In the case of a compiled program with an IF statement that
uses the NOT operator, the outcome is inconsistent if you assume any
non-zero value is a logical TRUE.
To work around this problem you can either replace the 1 in this example with -1, or use the NOT operator on the expression before performing the IF statement as follows:
Additional query words: VBmsdos BUGLIST1.00 1.00
Keywords : |
Last Reviewed: December 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |