Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Array by Reference to anoher Form
Message
 
 
À
19/07/2006 05:40:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01137472
Message ID:
01137540
Vues:
17
In the function/method call parameters are passed by value (unless it changed by SET UDFPARMS which I strongly discourage). You have to prefix parameter with '@' to pass it by reference. An array can be passed in only by reference. A property array cannot be passed by reference.
    * Copy the property array to a local array so it can be passed by reference
    ACOPY(This.aFiles, laFiles)
   .oOutLook.SendOutlookMail(lcTo, lcSubject, cPath, @laFiles)
>
>Until now i pass the array between forms, i need to pass the same array to an object like,
>
>   .oOutLook.SendOutlookMail(lcTo, lcSubject, cPath, .aFiles)
>
>If i use the same technique, in .SendOutlookMail it gives that 'taFiles is not an array'.
>
>SendOutlookMail
>   LPARAMETERS tcTo, tcSubject, tcPath, taFiles
>   DIMENSION This.aFiles[1]
>   ACOPY(taFiles, This.aFiles) && Error here
>
>
>João Batista
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform