Thanks,
rg
> I know about class-slots (and class-direct-slots) but these return
> (apparently) opaque slot-definition objects from which the name
> cannot be portably extracted.
Try to call SLOT-DEFINITION-NAME on these objects, which should be
about as (non-)portable as CLASS-SLOTS itself.
CL-USER 82 > (defclass foobaz () (a b))
#<STANDARD-CLASS FOOBAZ 402000850B>
CL-USER 83 > (class-direct-slots *)
(#<STANDARD-DIRECT-SLOT-DEFINITION A 412021FACB> #<STANDARD-DIRECT-SLOT-DEFINITION B 412021FAE3>)
CL-USER 84 > (slot-definition-name (first *))
A
I which packages the functions are is implementation
dependent. Also not every implementation
stores slot-information as slot-definition
objects.
Just what I was looking for. Thanks!
rg
Just what I needed. Thanks!
rg
(mapcar #'slot-definition-name (class-slots some-class))
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
Sorry for the clearly out of topic question, but any idea where I
could find documentation about this '*' variable ? Hard to google
about '*' or 'start' symbol !
-Nicolas
* is the last value
** the value before that
*** the value before that
See also -, + and /
HyperSpec, Symbol Index, Non-Alphabetic
http://www.lispworks.com/documentation/HyperSpec/Front/X_Alph_9.htm
Variable *, **, ***
http://www.lispworks.com/documentation/HyperSpec/Body/v__stst_.htm
When you use LispWorks, c-sh-d on a symbol shows the
documentation for the symbol in a web browser...
http://l1sp.org/cl/* will get you there (most other CL symbols work
too).
Zach
If all fails (no internet connection, no browser, ...) there is
still hope:
CL-USER 103 > (documentation '* 'variable)
"Holds the value of the most recent top-level EVAL."
CL-USER 104 > (documentation 'documentation 'function)
"Returns the documentation string associated with the given object (if any)."
It has the meaning I felt it has but wasn't sure whether I was missing
something or not.
Thanks for the documentation howto ;)
-Nicolas
Thanks, I just learned the +, ++ and +++ variables.
-Nicolas