Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I get an array ?
Message
De
26/02/1999 02:59:04
 
 
À
26/02/1999 02:47:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00191828
Message ID:
00191831
Vues:
22
>How can I get an array as function return value?

You simply can't.
If you want to do something like that you have to pass the array to the function by reference, manipulate it in your function and when you get back, you have your 'returned' array.

ex.

local laSomething[10]

*-- laSomething[5] equals .f.


MyFunction(@laSomething)

*-- returned from function call,
*-- now you can see that
*-- laSomething[5] equals 'kweeniewa'
? laSomething[5]

*-------------------------
function MyFunction
*-------------------------
LPARAMETERS taArray

taArray[5] = 'kweeniewa'

ENDFUNC


****************
Or you can return an object reference with user defined props.
Which is a bit closer to what you have in mind I think.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform