Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass form's array
Message
From
03/09/2000 22:21:11
 
 
To
03/09/2000 22:12:34
Ng Man Kit
Genesis Systems Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00412199
Message ID:
00412200
Views:
17
>I can pass a reference of an array to my function using '@' sign (e.g. myfunction(@myarray)). When I tried the code 'myfunction(@THISFORM.myarray)', error message was prompt. Anyone know how to pass form's array?
>
>Thanks!
>
>Geoffrey

2 ways:
1) Copy the array and pass the copy, like so
WITH thisform
  DIMENSION laPassArray(ALEN(.MyArray,1),ALEN(.MyArray,2))
  ACOPY(.MyArray,laPassArray)
  myfunction(@laPassArray)
ENDWITH
2) Pass a reference to the form itself, and let the function access the form property

myfunction(thisform)
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform