Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters and what to check
Message
From
18/10/2007 10:59:15
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
17/10/2007 20:26:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01261696
Message ID:
01261853
Views:
23
Clever!

>
>lparameters cPar1, cPar2,cPar3
>do case
>  case pcount()<3
>    cPar3='mydefault3'
>  case pcount()<2
>    cPar2='mydefault2'
>endcase
>
>>Let's say I have a procedure that is expecting 3 parameters, but sometimes only 2. They should all be character. Is there a standard that others use that would run through some validations, checking type, pcount, stuff like that? Want to make the project I'm working on as tight and error free as possible. Here is an example:
>>
>>
>>******************************************************************************************************
>>FUNCTION Procedure_Locked
>>******************************************************************************************************
>>
>>	LPARAMETERS tcProcess, tcLockUnlock, tcUserID
>>
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform