[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] print or output in packages.
From: |
Bill Page |
Subject: |
RE: [Axiom-developer] print or output in packages. |
Date: |
Thu, 16 Feb 2006 14:56:44 -0500 |
On February 16, 2006 6:42 AM Francois Maltey wrote:
>
> I use to add a lot of spy-print in mysterious functions.
> So I add print or output lines as bellow in a test, but I
> can't compile.
>
> In an *.input file I have no problem with output.
>
> I try the easiest print, with or without coerce ::, with or without $.
>
> output ("a string"::OutputForm)$OutputPackage
> output (1::OutputForm)$OutputPackage
You can use this:
output(outputForm("abc")$OutputForm)$OutputPackage
output(outputForm(1)$OutputForm)$OutputPackage
> -- or print ("num::OutputForm"::OutputForm)$PrintPackage
> -- print ("num::OutputForm")$PrintPackage
> -- output "den::OutPutForm"
>
>
> In the manip.spad file there are num and den that I try to print
> (in kerexpand about line 790)
>
> num := numer arg
> den := denom arg
>
> They are perhaps of type : SparseMultivariatePolynomial(R, Kernel $)
>
> 1/ How can I print theses variables ?
> 2/ What function must I use : print or output ?
> What is the difference between.
>
First import OutputForm and OutputPackage near the start of the
file, like this:
Implementation ==> add
-- for debugging only
import OutputForm
import OutputPackage
-- end debugging
import FactoredFunctions(P)
Now later in the program you can write:
-- for debugging output
num := numer arg
den := denom arg
output(message "num:")
output(num::OutputForm)
output(message "den:")
output(den::OutputForm)
-- end debugging
See for example:
http://wiki.axiom-developer.org/SandBoxManip
Regards,
Bill Page