Subject: problem calling MAXIMA function at lisp level
From: Richard Fateman
Date: Tue, 14 Jan 2003 11:13:45 -0800
I think that the documentation and the program should both
be changed.
A symbol in lower case is just that. Symbols x and X are different.
All built-in functions like sin, cos, tan, bessel_j, ... are in
lower case.
All labels are (by default) in lower case c1, d1, c2, d2 etc.
those this can be set by the user with inchar: and outchar.
Symbols of mixed case like FoOBaR are acceptable and the
case is preserved.
SIN, COS, TAN are not known to the system, but one could
easily change this by (SIN:sin, COS:cos, etc.)
Redefinition or removal of system functions like sin(x):= ....
should at a minimum print a warning, and perhaps a prompt (do you
really want to do this? yes/no/yes-to-all)
Stuff like this can break old code, and so there should also
be a program that converts from old to new.
RJF
Wolfgang Jenkner wrote:
> Ole Rohne <ole.rohne@cern.ch> writes:
>
>
>>MAXIMA symbol case apparently works differently on different
>>platforms.
>
>
> But it's supposed to work in the same way on all supported platforms.
>
> We have here two largely independent case-sensitivity issues.
>
> 1) The Lisp top-level.
>
> The ANSI CL reader does case conversion in accordance with the
> readtable case of the current readtable. Maxima doesn't change the
> readtable case of the readtable which was current at load-time.
> Since this was presumably the standard readtable $FooBar is read as
> |$FOOBAR|.
>
> 2) The Maxima top-level.
>
> Maxima converts FooBar to upper-case if and only if |$FOOBAR| is
> already accessible in the MAXIMA package and |$FooBar| is not.
>
> (C1) ?eq(FOO,foo);
> (D1) TRUE
> (C2) ?eq(bar,BAR);
> (D2) FALSE
> (C3) ?eq(BaR,BAR);
> (D3) TRUE
> (C4) ?eq(bar,BAR);
> (D4) FALSE
>
> (As an exception, single letter symbols are never converted, but this
> is by accident.)
>
> Currently there is a certain discrepancy between this behaviour and
> what is documented in the manual. See
>
> http://www.math.utexas.edu/pipermail/maxima/2002/002537.html
>
> (Contrary to what I suggested there I am not so sure anymore whether
> the source should be fixed to match the documentation or the other way
> around or...)
>
> Wolfgang
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima