[Ecls-list] cl_defparameter() question
Juan Jose Garcia Ripoll
jlr at mpq.mpg.de
Thu May 6 06:10:25 UTC 2004
Larry Clapp wrote:
>Juan Jose Garcia Ripoll said:
>
>
>>Michael O'Connor wrote:
>>
>>
>>
>>>c_string_to_object() works - thanks! However I
>>>couldn't get cl_intern() to work, so this works:
>>>
>>>cl_defparameter(c_string_to_object("*test-var*"),
>>> make_simple_string("test-value"));
>>>
>>>But this doesn't:
>>>
>>>cl_defparameter(cl_intern(1,
>>> make_simple_string("*test-var*")),
>>> make_simple_string("test-value"));
>>>
>>or the same reason it does not work under Common-Lisp: you have not told
>>INTERN in which package it should put the symbol.
>>
>>
>
>But that's an optional parameter. (INTERN "foo") works. Of course, you
>get |foo|, not FOO as you probably wanted.
>
>I bet it has more to do with the fact that c_string_to_object indirectly
>calls read_object on the string, which capitalizes it.
>
>
Ok, that is also true. But even if you pass the capitalized string to
INTERN, you have to make sure that the variable *PACKAGE* points to the
right package. That is what I meant O:-)
Juanjo
--
Max-Planck-Institut fuer Quantenoptik +49/(0)89/32905-345
Hans-Kopfermann-Str. 1, D-85748 www.mpq.mpg.de/Theorygroup/CIRAC/
Garching b. Muenchen, Germany Juan.Ripoll at mpq.mpg.de
More information about the ecl-devel
mailing list