Subject: problem calling MAXIMA function at lisp level
From: Ole Rohne
Date: 13 Jan 2003 11:01:35 +0100
wang yin <wang-y01@mails.tsinghua.edu.cn> writes:
> I tried to do something as the MAXIMA manual says:
> at MAXIMA level, I define a function:
> (C1) FOO(X, Y) := X + Y + 3;
> then, I press Ctrl-C to enter lisp level, and :
> MAXIMA>>(mfuncall '$foo 4 5)
> but I got the following answer:
> (($FOO SIMP) 4 5)
> not 12 as the manual says.
Your example works as expected under cmucl/x86:
/----
(C1) FOO(X, Y) := X + Y + 3;
(D1) FOO(X, Y) := X + Y + 3
(C2) to_lisp();
Type (run) to restart
* (mfuncall '$foo 4 5)
12
\----
Note however what happens when the function name is typed in lower case:
/----
* (run)
Maxima restarted.
(C3) bar(x, y) := x + y + 3;
(D3) bar(x, y) := x + y + 3
(C4) to_lisp();
Type (run) to restart
* (mfuncall '$bar 4 5)
(($BAR SIMP) 4 5)
* (apropos "$bar")
|$bar| ;; From MAXIMA
$BAR ;; From the lisp reader
\----
MAXIMA symbol case apparently works differently on different
platforms.
Ole