Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arrays as parameters
Message
From
28/07/2000 15:44:18
 
 
To
28/07/2000 15:34:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00398308
Message ID:
00398317
Views:
22
It worked!

Thanks a lot Trey. Great explanation btw!

Steph.


>Add the EXTERNAL ARRAY command after the LPARAMETERS to let the compiler know that this is an array coming in.
>e.g.
>LPARAMETERS lpPos, lpVal, lpArray
>EXTERNAL ARRAY lpArray
>LOCAL iPos, iLen, iStart
>If the array originates in the method or function, there will have been a DIMENSION, DECLARE or the array was created in the scope command - e.g., LOCAL laArray(1,1) - so those are recognized as arrays.
>The program would work because it know it's an array since it's in memory.
>However, since the compiler doesn't follow naming conventions, and VFP doesn't have strong variable typing, and array elements can be accessed the same way function can be called; something extra is needed to indicate to the compiler that the item is an array.
>e.g. Which of these is attempting to get the first element from an array and which is passing 2 parameters to a program?
>

>OneThing(1,1)
>AnotherThing(1,1)
Previous
Reply
Map
View

Click here to load this message in the networking platform