Microsoft KB Archive/108819

{| = PRB: "Unrecognized Command Verb" Message Caused by a Function =
 * width="100%"|

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).

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
 * }