Re: Re: Outputting S-expressions
Themos Tsikas <[email protected]>
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Organization | NAG Ltd |
| Message-ID | <[email protected]> |
You can traverse the SExpression (there's a convert to SExpression from InputForm) and do any edits you like by writing a recursive function on SExpression. Themos On Wednesday 08 November 2006 17:52, Ludovic Courtès wrote: > Hi, > > root <[email protected]> writes: > > | > One minor thing: in the output file, variable names are enclosed in > > | > `|' (e.g., `(+ 1 |x|)'). Is there a way to turn it off? > > | > > | Similarly, Axiom sometimes issues additional information that is not > > | relevant to me, for instance: > > | > > | (|primeFactor| (|::| |lambda| #0=(|Polynomial| (|Integer|))) 1) > > | > > | ... > > | > > | (|primeFactor| (|::| (+ |lambda| (* (+ R 1) |beta|)) #0#) 4) > > | > > | Is there a way one could tweak it into removing those additional > > | annotations? > > > > The output syntax says that these are eq objects (that is, they > > share the same memory locations). The #0= syntax says that this > > is the first instance of the s-expression and the #0# syntax says > > that this is a repeat. You can set *print-circle* to false to > > skip this syntax but be aware that a circular structure might > > print forever. From the Axiom prompt do: > > > > -> )lisp (setq *print-circle* nil) > > Thanks for your quick answer. > > I had actually guessed that this had something to do with shared > sublists. > > However, what I'm interested in is removing the type and type conversion > information, i.e., the `::' and `primeFactor'. IOW, I'd like to get > exactly the same information as is available on the console (or other > output styles), no more. Is this feasible? > > Maybe what I'm really looking for is an `sexp' output style? > > Thanks, > Ludovic. > > > > _______________________________________________ > Axiom-mail mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/axiom-mail > > ________________________________________________________________________ > This e-mail has been scanned for all viruses by Star. The > service is powered by MessageLabs. For more information on a proactive > anti-virus service working around the clock, around the globe, visit: > http://www.star.net.uk > ________________________________________________________________________