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:
00123088
Views:
25
>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.
>
Nigel,

You can simplify your code if you ALWAYS pass an array. In the case of a single network connection make it a one row array. It is a good practice to keep the developer's interface consistent. Write the code to process an array and always pass it an array.

The other alternative would be to only pass a single variable, when you need multiple connections you call the function many times, each time setting up one connection. Both of these, always passing an array and never passing any array reduce the external coupling of the function that sets up the netword connection and simplifies the developer's interface to that function.
Previous
Reply
Map
View

Click here to load this message in the networking platform