Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum number of parameters
Message
From
23/05/2017 06:36:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/05/2017 04:57:43
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:
01651340
Views:
70
This message has been marked as a message which has helped to the initial question of the thread.
>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?


You can pass an object with N properties as parameters. That would solve the parameter count problem.

You could pass that object as the first parameter, so in your procedure, with a slight change you make a type checking on the first parameter, if it is an object then new version is being called with N properties and you assign the values for other parameters within inside the procedure, else treat as the old version so you don't need to change existing callers.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform