Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining if Variable is an Array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00123051
Message ID:
00123088
Vues:
24
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform