Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum number of parameters
Message
From
23/05/2017 05:23:53
 
 
To
23/05/2017 05:08:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01651336
Message ID:
01651338
Views:
60
>>I am working on an old project, and there is a procedure that takes 30 Parameters. I need to expand the procedure to take 31 Parameters, but to my surprise when looking at the VFP limitation is says everywhere that the maximum number of parameters is 26. I am quite surprised because the function is working, but I am worried that there could be a problem especially when I add another one. Refactoring would be a lot of work and I really need to avoid that.
>>
>>So I wonder if that limitation has been removed in a certain Version of VFP, and if so which real limitation would that be?
>
>I know that officially the limit is 26. Why not let the function accept one of the parameters both as a value and as an array? If it's an array, the second element it treated as parameter 27 (or 31), the third element is 28 (or 32) and so on. Or you can use an object in the same way. That should require a minimum of rewrite.

That is a good idea. However I try first without changing the existing parameters, because otherwise I need to make too many changes in the calling procedures. Since the new parameter is optional I can get away with only a few changes. I will do extensive testing to see if there is any problem with 31 parameters.
But your solution is a good alternative in case I get an issue with the parameter count.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform