BUG: "Missing Operand" Error Message When Using a Function

Last reviewed: June 27, 1995
Article 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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.