[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Is there an easy way to tell if an instance variable (or slot) is
available in a particular structure?  Given an instance of a structure,
I'd like an easy way to tell if location is one of its instance variables
(or slots). One way would be to inspect the plist of the instances 
structure:  (I don't have a machine available at the moment, but you
get the idea)

(member 'location (symbol-plist (type-of foobar)))

...or whatever.  Is there an easier way, assuming that something like
the above would even work?  I think something like it would work on the
Symbolics, but I don't know if it would be portable.  A predefined function 
slotp would be nice, but such does not seem to be available. 

Thanks for any help.


* David Marchette                 *
*                                 *
* marchett@cod.UUCP               *
* marchett@noscvax.UUCP           *
* marchett@cod.nosc.MIL           *
* ucbvax!sdcsvax!noscvax!marchett *
*                                 *
* Naval Ocean Systems Center      *
* Code 421                        *
* 271 Catalina Blvd.              *
* San Diego, CA 92152             *
*                                 *
* Ph. (619) 225-6571              *