Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning arrays
Message
From
24/08/1998 06:48:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00129242
Message ID:
00129248
Views:
24
>Is there a way in fox to return or pass an array? When I return an array I only get the first element. (weak) :(
>
>Eric K.
Eric,
Arrays should be passed by reference. Default is by value and you don't need to change it, just add an @ in front of the var or call with "with".
do myprg with myArray && Passed by reference
=myprg(myArray) && Passed by value - only first elem value
=myprg(@myArray) && Passed by reference
Return is the same way but this is more complicated because if not defined public array would be out of scope (implicit release). Better define in caller level.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform