axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-math] Axiom: Printing multiple variables in axiom.


From: Constantine Frangos
Subject: Re: [Axiom-math] Axiom: Printing multiple variables in axiom.
Date: Sat, 10 Nov 2007 10:23:17 +0200

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.

However, I get an error for the example below.

C. Frangos.


(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 <address@hidden> 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: address@hidden , address@hidden 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]