On 12/17/07, cc <schnaps_w at hotmail.com> wrote:
> In Lisp
> (defun $test(expr)
> (print expr)
> )
> In Maxima
> test(a + b);
> Output
> ((MPLUS SIMP) a b)
> Expectant output
> ((MPLUS) a b)
> Does Maxima always change the format of Inputs to ((FunctionName Flag)
> parameters)?
> How can i get my function of Maxima without simplification in Lisp?
:lisp (defmspec $test (expr) (print expr))
test (1 + 1);
=> prints (($TEST) ((MPLUS) 1 1)) and returns test(2)
DEFMSPEC is a macro to define a Maxima function which does not evaluate
or simplify its arguments. Note that EXPR is the entire test(...) expression.
Note also that the return value is indeed simplified.
I don't know what you want to accomplish, so perhaps this revelation
of the arcana minor of Maxima is premature ....
HTH
Robert Dodier