Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does PARAMATERS() count empty parameters
Message
De
25/11/1998 16:08:47
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00161573
Message ID:
00161581
Vues:
21
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform