[Maxima] how to parameterise local variables?
smh at franz.com
Sat Jul 19 00:21:34 CDT 2008
From: "Robert Dodier" <robert.dodier at gmail.com>
Well, to generate a new variable, you can call the Lisp GENSYM function.
foo : ?gensym ();
bar : ?gensym (1234);
baz : ?gensym ("quux");
The case inversion (quux --> QUUX) is an artifact of Lisp's bizarre
case sensitivity rules.
If this really happens, I suspect it is due to Maxima's bizarre case
sensitivity rules, which probably originally derived from Maclisp's
bizarre case sensitivity rules, but which weren't so bizarre back when
Lyndon Johnson was president and card punches still walked the land.
(It arguably goes back further to the second Eisenhower
administration, but I digress.)
Anyway, in a conformant ANSI CL upcasing only happens when the reader
(in default case mode, etc. etc.) interprets an unescaped sequence of
characters as a symbol name. Functions like gensym and intern and
find-symbol are always required to preserve the actual characters in a
CL-USER(1): (gensym "quux")
CL-USER(2): (gensym "QuUx")
But I agree that case preservation of strings passed to gensym doesn't
matter very much in nearly all purposes for which gensym is used..
More information about the Maxima