Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Array by Reference to anoher Form
Message
From
18/07/2006 22:59:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/07/2006 22:54:25
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:
01137476
Views:
16
By default, parameters are passed by value, not by reference. Use the "@" symbol to pass by reference.

If laFiles is your array:
DO FORM gc_sendmail WITH lcNameFileToPrint, .txtCodigo.Value, 1, @laFiles
See also SET UDFPARMS - but I suggest not to change it; passing by value is safer as a default, so better only pass by reference when you really need it.

>Hi, all,
>
>I'm trying to pass one array by reference, from one form to another form, but it only pass the first column,
>
>
>Form1
>DIMENSION laFiles[nCopyNo]
>lnFiles=ADIR(laFiles,oApp.cAppPath+"\Tmp\"+lcNameFile+"*.*")
>DO FORM gc_sendmail WITH lcNameFileToPrint, .txtCodigo.Value, 1,laFiles
>
>Form2
>INIT:
>LPARAMETERS tcNomeFicheiro,tcCodTer,tnTipoTer,taFiles
>ThisForm.aFiles=taFiles
>
>
>
>Thank's
>
>João Batista
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform