Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing object array
Message
From
01/05/2019 13:47:16
 
 
To
01/05/2019 13:25:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01668317
Message ID:
01668334
Views:
45
>Sorin,
>
>Thanks for looking at this for me. I was under the impression by what Rick S. says that this is a way to pass an entire array to a different method (CallMethod) by attaching the array as a property of an object.

You can do that. You can also pass a memory variable array using the @laArrayName reference, and then in the called function use the EXTERNAL ARRAY taParameterName to identify that what was passed was not just element 1, but the entire array.

This is a way to pass an array by reference so it can be updated in the called function, which is what I was trying to do with my original post. I wanted to pass an array that's a member of an object that way, but VFP doesn't allow for that syntax.

>To me, without the additional array elements or rows being attached to the property makes this technique questionable as to it's value if it only attaches the first array element and none of the others.

It's a limitation of VFP's syntax parsing algorithm and/or compiler. It won't recognize @obj.aArrayName as a valid parameter, even though it would recognize @laArrayName as a memory variable being passed.

It's something that I don't think would be too hard to add, but since VFP9's ended ... it's the hard limitation.
Previous
Reply
Map
View

Click here to load this message in the networking platform