Constantine Frangos <[EMAIL PROTECTED]> writes: > Hi Martin, > > Thanks for the reply. I tried your suggestion and this works perfectly - the > inverted commas are ok. > > I tried your suggestion from a previous email to get axiom expressions in the > form: 2*x1 instead of 2x1.
why do you want to coerce the result of unparse (which is a string) to OUTFORM? Note that unparse takes something of type InputForm, so you'll have to coerce y to INFORM before passing it to unparse. The error message is telling you exactly this. Martin > (9) -> y > (9) -> > (9) cos(x2) + 2x1 > Type: Expression Integer > (10) -> unparse(y)::OUTFORM > There are no exposed library operations named unparse but there is > one unexposed operation with that name. Use HyperDoc Browse or > issue > )display op unparse > to learn more about the available operation. > > Cannot find a definition or applicable library operation named > unparse with argument type(s) > Expression Integer > > Perhaps you should use "@" to indicate the required return type, > or "$" to specify which version of the function you need. > (10) -> > > > > > On Friday 09 November 2007 20:41, Martin Rubey wrote: > > Constantine Frangos <[EMAIL PROTECTED]> writes: > > > In the function below, I tried to use the following commands > > > > > > )display value Acon > > > print(['Acon = Acon]) > > > > > > to print one or more variable. > > > > > > However, I get very strange behaviour and error messages, so had to > > > comment them out. There might be a bug somwhere in my program. > > > > > > If an axiom expert could implement a simplified version of the Maxima > > > display() function (probably a lisp function) in lisp/axiom, then this > > > would be very useful. > > > > > > In Maxima: > > > > > > x1:1; > > > x2:2; > > > x3:3; > > > display(x1,x2,x3); -> > > > x1 = 1 > > > x2 = 2 > > > x3 = 3 > > > > Well, axiom functions always evaluate all it's arguments first. So, for > > debugging I usually use > > > > output ["x1: ", x1, " x2: ", x2] > > > > If you want cleaner output, you'll have to look into OutputForm. For > > example, to print a string without the quotes, you can use message$OUTFORM: > > > > (1) -> message("1")$OUTFORM > > > > (1) 1 > > Type: > > OutputForm > > > > At least for expressions there is a way to quote and unquote, but I don't > > have it present right now. > > > > Martin > > -- > Constantine Frangos, Pr.Eng. > Professor > Dept. of Mathematics and Statistics > University of Johannesburg > Auckland Park Kingsway Campus > P O Box 524 > Auckland Park > Johannesburg 2006 > South Africa > > Tel: +27-11-559-2452 > Fax: +27-11-559-2832 > e-mail: [EMAIL PROTECTED] , [EMAIL PROTECTED] _______________________________________________ Axiom-math mailing list Axiom-math@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-math