Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum number of parameters in a method of a class
Message
From
21/10/2015 20:58:56
 
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:
01626303
Views:
54
>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.

Create a object and add an array or properties to it; then pass the object. Each of the parameter is added as a property as follows:
LOCAL loParameters
loParameters = CREATEOBJECT("Empty")
ADDPROPERTY(loParameters, "MyProperty", lnMyValue)
...
loResult = MyFunction(loParameters)
Alternately, you could use an array.
Previous
Reply
Map
View

Click here to load this message in the networking platform