[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defstruct doldrums
> From: eliot@winnie.Princeton.EDU (eliot handelman)
> I need to know how to map over the slots of random structures. Supposing
> this were called MAPSTRUCT, taking a function and a structure, it would
> feed the contents of each slot (and perhaps also the slot-name) to the
>On present versions of Allegro you can treat "untyped" (that is,
>default typed) defstructs as vectors. LENGTH will return the number
>of slots. SVREF (and SETF thereof) will operate correctly. The
>zeroth slot is the symbol naming the structure, and the remaining
>vector slots are the defstruct slots.
>Of course, this functionality of LENGTH and SVREF aren't provided by
>any CL spec and therefore might disappear or change in a future
Not good enough, I need the names of the access functions of structures
of type defstruct-description. It doesn't matter to me what the innards of
a structure look like, as long as I can know how many slots there are and
how to access those slots. For example there is a slot called SLOTS in
defstruct-description. What's the accessor called? Something like
>Say hello to Paul Lansky for me.
Will do, what's the connection?