Denis> You could use a plist:
Denis> 
Denis> (:key1 1 :key2 2)
Denis> 
Denis> Then to get a particular value:
Denis> 
Denis> (getf '(:key1 1 :key2 2) :key1) => 1
Denis> 

Jim> Or you could use defstruct [also in 'cl]

I don't know how many different structures you have.  If not too many, I
would just use lists (or even better, vectors) and for each field define
an accessor macro:

(defsubst get-key1 (result) (nth 0 result))

or

(defsubst get-key1 (result) (aref result 0))

-- 
Optimist: We're only two weeks behind schedule.
Pessimist: The schedule is a whole two weeks ahead of us.


_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to