Re: symbold and packages
Marc LeBrun <[email protected]> Thu, 08 Jul 2004 16:58:01 -0700
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <[email protected]> |
>=Fabrizio Morbini > -two lisp files, one is in package p1 and the other in package p2. > [...] > Is there a better way to solve the problem instead of using > (read-from-string (format nil "~a" *test*))? Almost certainly, but you didn't specify exactly what your problem was (although you made the context quite clear). You might say (member x *test* :test #'string-equal) which would cause member to compare the symbols' print names independent of their packages. You might also consider using a special package specifically for the symbols you wish to compare as data, rather than mixing them up with the package you are defining your program symbols in. You could define your own package for this, or use an existing one, such as the conveniently concise keyword package: (defparameter *test* '(:p :q :r)) and so on...