BUG: Incorrect Return Value with CAPSLOCK() or NUMLOCK()Last reviewed: April 18, 1995Article ID: Q113174 |
The information in this article applies to:
SYMPTOMSThe logical result of an operation involving the NUMLOCK() and CAPSLOCK() functions incorrectly returns a FALSE value when either function is used with the logical expression operator and the second expression returns TRUE.
RESOLUTIONTo work around this behavior, you must use a nested IF statement if you are going to use the result of either NUMLOCK() or CAPSLOCK() in conjunction with another logical expression. For example, the following code will correctly display the WAIT window message:
***Begin Code example of solution*** * ensure the NUMLOCK key is on STORE .T. to istrue IF NUMLOCK() IF istrue WAIT WINDOW 'they are both true' ENDIF ENDIF ***End code example*** STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce BehaviorTo reproduce the incorrect behavior, use the following code example:
***Begin code example*** * ensure the NUMLOCK key is on STORE .T. to istrue IF NUMLOCK() AND istrue WAIT WINDOW 'they are both true' ENDIF ***End of code example***Note that the WAIT window message does not appear as it should in this example.
|
Additional reference words: FoxDos 2.00 2.50 2.50a 2.50b 2.60 true logic
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |