Hi There:
Can someone tell me how I can have a program generate names of symbols in
Common Lisp? I am trying to generate node names automatically for a
search graph (for example: n0, n1, n2, etc). I can use (format nil "n~a"
numvalue) to generate the name in string form, but how do I get a symbol
name that I can use to reference the data (which is an a-list)? I would
think to use (coerce ...), but (at least in my version of CLISP) I can't
coerce the string to a symbol.
My background is C & there I'd be using pointers...but I don't have a lot
of LISP experience so I'm at a loss here.
Thank you in advance for your help.
den Drown
(········@aol.com)
In <··········@newsbf02.news.aol.com>, ··········@aol.com (CantSwimUS) writes:
>Hi There:
>
>Can someone tell me how I can have a program generate names of symbols in
>Common Lisp? I am trying to generate node names automatically for a
>search graph (for example: n0, n1, n2, etc). I can use (format nil "n~a"
>numvalue) to generate the name in string form, but how do I get a symbol
>name that I can use to reference the data (which is an a-list)? I would
>think to use (coerce ...), but (at least in my version of CLISP) I can't
>coerce the string to a symbol.
There is a special function for this in LISP , try (gensym).
Marc Mertens
·······@ibm.net