Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!eos!riacs!turing.arc.nasa.gov!nienart From: nienart@turing.arc.nasa.gov (john nienart) Newsgroups: comp.lang.lisp Subject: Re: query 'bout defstruct (Common LISP) Message-ID: <786@hydra.riacs.edu> Date: 2 May 88 20:38:44 GMT References: <10834@cgl.ucsf.EDU> Sender: uucp@riacs.edu Reply-To: nienart@turing.arc.nasa.gov.UUCP (john nienart) Followup-To: comp.lang.lisp Organization: NASA Ames Research Center Lines: 19 Keywords: setf, gentemp, clarity Summary: Answer about SETF In article <10834@cgl.ucsf.EDU> yee@cgl.ucsf.edu (dave yee) writes: > >Now, i figured i could use "gentemp" to make the symbols, >but i can't "setq" these new symbols (i.e. >(setq (gentemp) (make-piece)) just doesn't cut it... > How about (setf (symbol-value (gentemp)) (make-piece))? This gets the effect you want. However, you don't have a handle on the name after this, so you probably want something like: (let ((sym (gentemp))) (setf (symbol-value sym) (make-piece)) ...) which gives SYM a value which is the name of your piece. Symbol-value can access it then. Hope this helps. --John nienart@turing.arc.nasa.gov