Microsoft KB Archive/117356

{| = BUG: "Missing Operand" Error Message When Using a Function =
 * width="100%"|

ID: Q117356

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6
 * Microsoft FoxPro for MS-DOS, version 2.6

SYMPTOMS
When you are typing in a function and the return value from the function contains an expression, the error message "Missing Operand," is returned if the expression is not placed inside parentheses.

For example, if you create a function called TEST and type the following code in the function

FUNCTION TEST X=.T.  RETURN X= .NOT. .F. when you type "?TEST" (without the quotation marks) in the Command window, you will receive the error "Missing Operand."

RESOLUTION
To avoid this problem, either enclose the return value for the expression in parentheses or reverse the order of the expression. For example:

RETURN .NOT. .F. = X

-or-

RETURN X = (.NOT. .F.)

STATUS
Microsoft 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.

Additional reference words: FoxDos FoxWin 2.60 buglist2.60 parenthesis parens errmsg err msg KBCategory: kbprg kberrmsg kbbuglist KBSubcategory: FxprgGeneral
 * }