Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unlimited number of parameters
Message
From
27/01/2005 14:51:05
 
 
To
27/01/2005 13:51:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00981000
Message ID:
00981393
Views:
43
>>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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform