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: Martin Rubey
Subject: Re: [Axiom-math] Axiom: Printing multiple variables in axiom.
Date: 09 Nov 2007 19:41:09 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

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





reply via email to

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