Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing and returning arrays
Message
 
À
15/03/2002 15:18:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00633588
Message ID:
00633624
Vues:
24
Jim,

Arrays MUST be passed by reference, this means that the called routine is changing the array that was passed, so ...
DIMENSION laArray(2)
laArray(1) = "abc"
laArray(2) = "def"

MyFunc(@laArray)  && the @ forces "pass by Reference"

?laArray(1) && shows 123
?laArray(2) && showa 456

FUNCTION MyFunc
LPARAMETERS paArray
paArray(1) = "123"
paArray(2) = "456"
RETURN
ENDFUNC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform