Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array to a function, different array back
Message
From
19/10/2003 20:27:04
 
 
To
17/10/2003 17:00:07
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00839921
Message ID:
00840146
Views:
16
Include a "@" before the array variable in the parameter list and use DIMENSION in the function to redimension the array.

Ex.:
LOCAL ARRAY laTest [1, 2]

laTest [1, 1] = "Test1"
laTest [1, 2] = "Test2"
DoIt (@laTest)
RETURN

FUNCTION DoIt

LPARAMETERS taTest

DIMENSION taTest [2, 3]
taTest [1, 1] = 1
taTest [1, 2] = 2
taTest [1, 3] = 3
taTest [2, 1] = 4
taTest [2, 2] = 5
taTest [2, 3] = 6
RETURN
HTH

>How can I pass an array as a parameter to a function and then get a different array back as the results of that function???
Previous
Reply
Map
View

Click here to load this message in the networking platform