Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum number of parameters in a method of a class
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01626276
Message ID:
01626309
Views:
49
>>>Hi everybody,
>>>
>>>According to Visual FoxPro maximum capacity info I found online the maximum number of parameters per function is 26. However, I made an experiment and was able to pass 27 parameters (I got compile error trying to add 28th parameter).
>>>
>>>Would it be save to use a method in a class in a highly transactional application with 27 parameters? The method already uses 26 parameters and I have a need to add one more.
>>>
>>>Thanks in advance.
>>
>>Why not pass an object as parameter and add all as properties of that object.
>>That way you will pass one parameter :-)
>
>It is an existing method of a class and we're normally passing everything as parameters. Here is the current declaration of this method
>
>
>procedure ValidatePass(tcSalesPoint as string, tcOperator as string, tcPassTable as string, ;
>		tcWhichKey as string, tcPrefix as string, tnPassNo as double, tcDptCatItm as string, ;
>		tnNumVals as integer, tcPhysLocation as string, ttScanDateTime as datetime, tnParentNo as double, ;
>		tcNoTrans as string, tnScanNo as double, tnSiteNo as integer, tcScanNo as string, ;
>		tcCheckpointName as string, tcCheckpointValue as string, tlTrickle as Boolean, tyPrice as decimal, ;
>		tnTransNo as double, tnCreatedPassNo as double, tcAutoSaleDCIs as string, ;
>		tlFromScanner as Boolean, tcPassNo as string, tnBenefitID as double, tcMbRedemptions as string) as string ;
>		helpstring "Process a validation for a passholder record including updating record and recording log entries."
>	
>
>So, normally I would add an extra parameter (as I need to add tnExtraDays parameter). I guess I have no other choice but to create nExtraDays property of the class and use it instead and re-set in each call. The problem is that I already coded another method to use parameter and for consistency I think I'll change that method as well to use that new property.

Create another method that will accept Object as parameter :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform