Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing if an object is an instance of a class
Message
From
07/10/2005 07:01:16
 
 
To
07/10/2005 06:23:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057071
Message ID:
01057090
Views:
12
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform