Let's say you have the following:
(setf item-a '"test")
I want to make a new item from
item-a that would be the same
as if I had said (setf item-b 'test).
How can I create item-b using
item-a?
ITEM-A is a SYMBOL:
Package: common-lisp-user
Accessibility: :internal
Accessible In: nil
Value: "test"
Special Variable ?: NIL
Constant ?: NIL
Function: no global function definition
Macro ?: NIL
Special form ?: NIL
Setf-able ?: NIL
Plist: NIL
ITEM-B is a SYMBOL:
Package: common-lisp-user
Accessibility: :internal
Accessible In: nil
Value: TEST
Special Variable ?: NIL
Constant ?: NIL
Function: no global function definition
Macro ?: NIL
Special form ?: NIL
Setf-able ?: NIL
Plist: NIL
read-from-string seems to be the best solution for now.
Steve Polyak <·······@interaccess.com> wrote in article
<··························@spolyak>...
> Let's say you have the following:
>
> (setf item-a '"test")
>
> I want to make a new item from
> item-a that would be the same
> as if I had said (setf item-b 'test).
> How can I create item-b using
> item-a?
>
> ITEM-A is a SYMBOL:
> Package: common-lisp-user
> Accessibility: :internal
> Accessible In: nil
> Value: "test"
> Special Variable ?: NIL
> Constant ?: NIL
> Function: no global function definition
> Macro ?: NIL
> Special form ?: NIL
> Setf-able ?: NIL
> Plist: NIL
>
> ITEM-B is a SYMBOL:
> Package: common-lisp-user
> Accessibility: :internal
> Accessible In: nil
> Value: TEST
> Special Variable ?: NIL
> Constant ?: NIL
> Function: no global function definition
> Macro ?: NIL
> Special form ?: NIL
> Setf-able ?: NIL
> Plist: NIL
>
>
In article <··························@spolyak> "Steve Polyak" <·······@interaccess.com> writes:
\\ Let's say you have the following:
\\
\\ (setf item-a '"test")
\\
\\ I want to make a new item from
\\ item-a that would be the same
\\ as if I had said (setf item-b 'test).
\\ How can I create item-b using
\\ item-a?
(intern (string-upcase "test") :common-lisp-user)
should do the trick.
Sunil