Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PARAMETERS() bug?
Message
From
11/11/2002 09:19:38
 
 
To
11/11/2002 07:19:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00720910
Message ID:
00720954
Views:
29
The problem is that I know how much parameters I can pass to my UDF and that is a fixed number.
But someone can pass (even I can 'mistake') the more parameters that actually is necessarily.
So, if that happens it mustn't go to my .PRG with UDF. The user of my UDF wouldn't know what to do then, so I must deal with that possible 'error' in a way that would explain user (=messagebox) what is 'error' and exit function.


>>So I should define 5 parameters in LPARAMETERS so I could then go to line IF and see if there is a too much parameters and deal with that 'error' on my own?
>
>That would very much depend on what you want.
>
>Do you want 5 parameters, and need them in some cases? Then define the additional parameters.
>
>Do you really only need, for instance, 3 parameters? Then you should always call the function with 3 parameters or less. Also, you should be happy that Visual FoxPro a. catches your programming error in the first place, and b. gives you such a clear error message.
>
>Hilmar.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform