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

ID: Q108819

The information in this article applies to:

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

Last Reviewed: June 27, 1995