On Tue, 27 Apr 2010, Robert Dodier wrote:
< On Tue, Apr 27, 2010 at 1:59 PM, Leo Butler <l.butler at ed.ac.uk> wrote:
<
< > How do I turn off the 'pretty printing' used by save?
< > E.g. code saved by save looks like
< >
< > (#1# $Y (#2=(MSETQ) $DEPTH 10) (#2# $TYPE (#3=(MQUOTE) $FLOAT)))
< >
< > and I guess load uses a reader macro to expand #1 etc.
< > I would like to see the expanded lisp form.
<
< Oh, that's the result of the Lisp special variable *print-circle* ...
< try this before save:
<
< :lisp (setq *print-circle* nil)
<
< Does that make a difference?
<
< You can blame me for this. *print-circle* = t tells Lisp to try to
< print circular data structures with references to stuff already
< printed (that's what the #1# etc are about). With *print-circle* = nil,
< circular structures can cause endless printing (effect probably
< varies by Lisp implementation). The assume machinery creates
< circular data structures so they are pretty common in Maxima.
<
< I put the (setq *print-circle* t) into src/init-cl.lisp to prevent
< problems when inspecting properties of variables which have
< assume properties. Like this: (with Clisp)
<
< (%i1) :lisp (setq *print-circle* nil)
< NIL
< (%i1) assume(x>0);
< (%o1) [x > 0]
< (%i2) :lisp (symbol-plist '$x)
<
< *** - Lisp stack overflow. RESET
<
<
< FWIW
<
< Robert Dodier
<
<
Thanks, that did the trick.
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.