Re: [Scheme-reports] Write procedure is not backwards compatible John Cowan (03 Jul 2012 07:44 UTC)

Re: [Scheme-reports] Write procedure is not backwards compatible John Cowan 03 Jul 2012 07:43 UTC

Aaron W. Hsu scripsit:

> Chez Scheme does have WRITE that handles cycles. Specifically, there
> is a parameter PRINT-GRAPH that controls whether or not WRITE will
> print the shared structure of the datum or not.

Unless you are doing multiple writes within a single procedure, you are
going to have to wrap each write in parameterize in order to get the
correct effect:

(parameterize ((print-graph #t)) (write obj port))

or use #f for #t.  Given all that verbosity, I'd just as soon have separate
write procedures.

--
John Cowan   cowan@ccil.org    http://ccil.org/~cowan
Original line from The Warrior's Apprentice by Lois McMaster Bujold:
"Only on Barrayar would pulling a loaded needler start a stampede toward one."
English-to-Russian-to-English mangling thereof: "Only on Barrayar you risk to
lose support instead of finding it when you threat with the charged weapon."

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports