Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Array by Reference to anoher Form
Message
 
 
To
19/07/2006 05:40:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01137472
Message ID:
01137540
Views:
16
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform