Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unlimited number of parameters
Message
 
 
À
27/01/2005 13:51:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00981000
Message ID:
00981393
Vues:
41
>>Yes, you have to declare as much parameters as the maximum expected, but you can know the actual number of parameters passed by using pCount(). Checking for the first logical FALSE could be misleading because it could be a valid parameter.
>
>Yes, I would do like that.
>
>>Furthermore, if this is something beyond your control, you don't have other choice. If you can control the caller side, a better idea can be refactor this solution by introducing a parameter object, or maybe you already have an object with this data, and then you can pass it trough.
>
>This can't be as this is the EXE entry parameters. This is launch from an icon.

Hmmm... What about a config file instead?

The main advantage is a cleaner interface. As in a parameter object, in a config file you normally has an explicit list of parameters like:

Server=QWERTY
Dabatase=ABC
Connection=IP
Etc=123

Even if you need to make some entry parameters variable (i.e. the content of a config variable or the resutl of a batch file), this is usually limited to a few parameters, while most of them belong to a config file.

Again, I don't know your case, so maybe this is not an option.

Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform