Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return Multiple Values From a UDF
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00979276
Message ID:
00979514
Views:
14
>To All:
>IS there a way in VFP to return multiple values from a User Defined Function? I don't want to use an Array, then I have to pass by reference and I am trying to avoid that. I have thought about casting and concatenating the values to a single string then returning that and parsing it when needed but I know there has to be a 'cleaner' way to accomplish this.
>
>Thanks!

Woodie,

As the others have told you, there're a number of ways of doing this. What they haven't told you is that this isn't a particularly good idea.

Why? Good practice is to invoke functional cohesion. What this means is that a given method/procedure/function does one, and only one, thing only.

This makes your code more flexiable, and, at the same time, more re-usable.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform