Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining if Variable is an Array
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00123051
Message ID:
00123072
Views:
19
Hi Nigel,

Sorry about confusing you. I had not stated my point correctly. VFP has a problem when using CREATEOBJECT() to create an instance of a form and you want to pass an array as a parameter to it. In such a situation if your array is a property of an object then you can pass the object itself as a parameter when creating the instance of a form... and you can access the array through the parameter object.

You are doing something totally different so don't worry about it. < g >

>Kamal,
>Thanks for that - it worked fine. I'm confused by your point about 'unless the array exists as a property of the object'? My situation is that I have a NetManager class method being passed either a single network connection name or an array of networks to connect to. There is no storage of the array so no property is needed because the array is passed as reference.
>
>>Hi Nigel,
>>
>>You can use TYPE('aArrayName[1]') == 'U' to figure out if an array does not exist. Though in your case the problem would be different because you cannot pass an array as a parameter to an object's method unless the array exists as a property of the object.
>>
>>>I am trying to create a method in a class which can received as a parameter either two variables or a single array. I can't find any way of identifying if a variable is of type 'Array'. The TYPE() function only returns the type of the contents. Does anybody know how I can do this?? TIA,
Previous
Reply
Map
View

Click here to load this message in the networking platform