Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array property as a referenced parameter to a function
Message
De
01/09/1997 23:38:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00047926
Message ID:
00047979
Vues:
27
>How can I send an array wich is a property of a form (ie: Thisform.aMyarray) to a function as a referenced parameter, I'm trying to do this: lnReturnedValue = MYFUNCTION(@ThisForm.aMyarray) but it doesn´t work
>
>I've been doing this but it can be a lot of overhead processing
>
>local laMyarray(1), lnReturnedValue
>=acopy(ThisForm.aMyarray,laMyarray) && copies the array to a temporary local variable
>lnReturnedValue = MYFUNCTION(@laMyarray) &&the function changes the array
>=acopy(paMyarray,ThisForm.aMyarray) && returns the temporary array to the property
>
>Any help?

This is a really bad bug, because it doesn't respect the VFP's rules for parameter passing.

I tried the SET UDFPARMS TO REFERENCE and this also fails. I also tried to call the function as a procedure (params are passed as reference by default to procs), failed again.

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform