stringout of operators



2013/2/14 Wilhelm Haager <wilhelm.haager at htlstp.ac.at>:
> Hi,
>
> I have declared a function as a prefix-operator, e.g.:
> "->"(x):=display(x);
> prefix("->");
>
> Output of the function definition via
> stringout("test.mac",functions)

This writes all user defined functions to test.mac.
prefix("->"); defines an operator and is no function definition.
Maybe what you want is
stringout("test.mac", input);

HTH
Volker van Nek

> writes the following line into the file test.mac:
> -> x:=display(x);
>
> Reading that file into another Maxima session results in
> the error message
> "stdin:4:incorrect syntax: > is not a prefix operator",
> as that Maxima session does not know, that the function
> has to be treated as a prefix operator.
>
> Obviously the operator-"ness" of a function is
> not being saved with stringout.
>
> Is that a bug or have I just missed or overseen
> something?
> Can the operator-"ness" of a function be saved
> using stringout (or another function),
> into a mac-file, not a Lisp file (using "save")?
>
> Thanks in advance
> Wilhelm
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima