Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning object or arrays from within functions, method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00008798
Message ID:
00008945
Vues:
29
>>> >Does anyone know how to return an array or an object reference from
>>within a method or function or procedure?
>>>
>>> You can't return an array.
>>>
>>> Vlad
>>
>>But you can pass the array to the function by reference, change the array
>>values in the function, and return to the calling program. In essence, you
>>are returning the array from the function.
>>
>>.
>
>As I already told to Tom: You're right, but not using RETURN command. My answer was connected only to the example code in the original message and it was not complete.

Vlad

Vlad was technically correct. You cannot explicitly *return* an array. You must address memvars by reference in order to read the results in an array.

This is one 'quirk' about this forum. We are all usually in a hurry since we have our own work 'calling our name' to get done. So a number of us can only give very short answers & move on. Vlad answered the question correctly but I would think he was busy & moved on without getting into a long drawn out detailed discussion.

I have definitely fell victim to this a number of times. We try to give correct answers and as accurately as possible but time constraints cuase us to just give superficial answers and move on to the next message. Thanks goodness there are others who will add tidbits.

With all the helpful people here it is still the best place for FoxPro. Matter of fact I let my FoxPro Advisor mag subscription run out & will let my MS Developers CD run out & use this resource excluseively.

If you do not get a satisfactory answer within a day or two then post it again. But then you may have stumped the 'panel'! (s)

Thanks to All
Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform