PRB: "Unrecognized Command Verb" Message Caused by a Function

Last reviewed: June 27, 1995
Article ID: Q108819
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for Macintosh, version 2.5b

SYMPTOMS

Issuing a function that is not preceded by an equal sign (=) causes the following error message:

   Unrecognized command verb

RESOLUTION

By design, the return value of a function is assigned to a field or memory variable, therefore requiring the use of an equal sign with the function.

Some functions, however, are commonly used in situations where you do not want to store the return value. In other words, no field or memory variable needs to be placed to the left of the equal sign that precedes the function. When the function is run, its return value is discarded (in essence, assigned to null).

MORE INFORMATION

Example Using the ADIR() Function

Suppose you want to store file information about C:\AUTOEXEC.BAT in a memory variable array named TEST. The following example of the ADIR() function accomplishes this:

   =ADIR(test, 'c:\autoexec.bat')

The return value of the ADIR() function is the number of files that match the string "C:\AUTOEXEC.BAT". In this example, you do not need to store this information, so nothing is placed to the left of the equal sign.

NOTE: The ADIR() function is not available in FoxPro 1.02 for MS-DOS.


Additional reference words: FoxMac FoxDos FoxWin 1.02 2.00 2.50 2.50a 2.50b
errmsg
err
msg
KBCategory: kbprg kberrmsg kbprb
KBSubcategory: FxenvAutoexec


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.