Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!ucsfcgl!yee From: yee@cgl.ucsf.edu (dave yee) Newsgroups: comp.lang.lisp Subject: query 'bout defstruct (Common LISP) Message-ID: <10834@cgl.ucsf.EDU> Date: 30 Apr 88 00:21:27 GMT Organization: UCSF Computer Graphics Lab Lines: 34 Keywords: defstruct, symbols, confusion Hi there, i have an easy question for you LISP experts... First of all, i'm using common LISP. i would like to define a data structure using defstruct. For example: (defstruct (piece) (is-viable t) (coord-x 0) (coord-y 0) (coord-z 0)) so far, so good. Now for the tricky part. I will have a variable number of "pieces" at any given time in the program. So i would like the computer to generate new symbols for me. The new symbols would then be used as names for the new pieces. 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... Anyone have any suggestions? Is there anotyher way i can have the program create new symbols which could be used in this way? any suggestions would be appreciated... -- -dave: ARPA: yee@cgl.ucsf.edu "Language is a UUCP: ucbvax!ucsfcgl!yee Virus from Bitnet: yee@ucsfcgl.BITNET Outer Space"