PRB: "Missing Operand" Using TIME() with WAIT WINDOW Command
Article ID: 156240
Article Last Modified on 12/3/2003
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q156240
SYMPTOMS
In Visual FoxPro, you can use the WAIT WINDOW command with any character
expression to display a message in the upper right corner of the Visual
FoxPro desktop. However, when you try to use the TIME() function with the
WAIT WINDOW command, as in WAIT WINDOW TIME(), you receive the following
error message:
Missing Operand
CAUSE
Although the TIME() function is returning a character string, the WAIT
WINDOW command is interpreting the first four characters of the function
(TIME) as an abbreviation for the TIMEOUT command. The TIMEOUT command is
expecting a numeric value as its first clause, but instead it is being
passed a value of "()." Since this is not a valid numeric value, the
"Missing Operand" error occurs.
RESOLUTION
You can use the following workaround:
WAIT WINDOW ""+TIME() && Includes the double quotation
STATUS
This behavior is by design.
Additional query words: kbdse VfoxWin kbvfp300 kbvfp300b kbvfp500 kbvfp600
Keywords: kbprb KB156240