Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning multiple values form a function
Message
De
03/05/2000 20:19:17
 
 
À
03/05/2000 13:03:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00365646
Message ID:
00365881
Vues:
16
>Is it possible to return many values from a function or a procedure. I tried to return an array which would contain all the values I need but it didn't work, I only got the last value.

You can't return an array, you can send a blank array by reference, and modify it, and it will be available in modified for to the callling program. You can also just send multiple blank variables by reference:

store space(100) to lc1, lc2, lc3
?MyFunction(@lc1, @lc2m @lc3)


Then, have your function accept the 3 params and modify the local parameters within the function, and when you return, use the previously blank varibals for your purposes. Also, you can create a parameter object to pass around using multiple properties on that, or just another array property.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform