Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does PARAMATERS() count empty parameters
Message
From
25/11/1998 16:08:47
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00161573
Message ID:
00161581
Views:
20
I don't understand why you'd get an error under these circumstances, but pcount() is the "preferred" way of checking parameter counts. The following is from the VFP help:

"Note The value returned by PARAMETERS( ) is reset every time a program, procedure, or user-defined function is called or when ON KEY LABEL is executed. Unlike PARAMETERS( ), the PCOUNT( ) function does not get reset, so PCOUNT( ) may be preferable in most programming situations"

HTH,
DaveR


>I pass two parameters to proc1. One has a value and the other is empty. In proc1 there is a "IF PARAMETERS() < 2" which produces an error message. On my machine it counts two parameters and no error message is produced. On another machine using the same executable, the error message is produced.
>
>Is there some oddity about PARAMETERS()?
>
>Thanks - Brenda
Previous
Reply
Map
View

Click here to load this message in the networking platform