Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing if an object is an instance of a class
Message
De
07/10/2005 07:01:16
 
 
À
07/10/2005 06:23:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01057071
Message ID:
01057090
Vues:
13
Hi Cetin,

I wonder when could ACLASS() return an empty (or no) array?
If the second parameter passed is no object, ACLASS throws an error,
if the second parameter passed is an object, it will have at least a baseclass, therefore one element minimum. That it is an object is already tested.

It's personal taste, I find David's function version better readable. Perhaps your's would be if adding one or two comments and definitions for the constants you pass to ASCAN. The performance issue of returning a result of an expression without first storing to a variable should be unimportant here. On the other hand that could be better named to eg llIsFamily.

Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform