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:49:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/10/2005 07:01:16
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:
01057105
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.

I didn't say it might return an empty or no array. I don't know a case where it does. Even with activex you get a return value > 0 (but not something very usefull for this).

As you said it's personal taste. To me edited version is 'readable at a glance and self exlanatory'. You find llIsFamily better and that's kind of redundancy for me:) 'Is' already denotes a boolean check IMHO and lIsFamily or IsFamily looks better if ever need be.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform