unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: doco write and display
Date: Sun, 04 May 2003 09:07:18 +1000	[thread overview]
Message-ID: <871xzfmxy1.fsf@zip.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

I thought to add something for `write' in the manual, and to emphasise
the machine/human readability of it versus `display'.

	* scheme-io.texi (Writing): Add write, revise display.

New text, for contemplation:

 - Scheme Procedure: write obj [port]
     Send a representation of OBJ to PORT or to the current output port
     if not given.

     The output is designed to be machine readable, and can be read back
     with `read' (*note Reading::).  Strings are printed in
     doublequotes, with escapes if necessary, and characters are
     printed in `#\' notation.

 - Scheme Procedure: display obj [port]
     Send a representation of OBJ to PORT or to the current output port
     if not given.

     The output is designed for human readability, it differs from
     `write' in that strings are printed without doublequotes and
     escapes, and characters are printed as per `write-char', not in
     `#\' form.



[-- Attachment #2: scheme-io.texi.write-display.diff --]
[-- Type: text/plain, Size: 1369 bytes --]

--- scheme-io.texi.~1.9.~	2003-05-04 08:57:36.000000000 +1000
+++ scheme-io.texi	2003-05-04 09:05:51.000000000 +1000
@@ -180,13 +180,26 @@
 has no associated print state, @code{#f} is returned.
 @end deffn
 
+@rnindex write
+@deffn {Scheme Procedure} write obj [port]
+Send a representation of @var{obj} to @var{port} or to the current
+output port if not given.
+
+The output is designed to be machine readable, and can be read back
+with @code{read} (@pxref{Reading}).  Strings are printed in
+doublequotes, with escapes if necessary, and characters are printed in
+@samp{#\} notation.
+@end deffn
+
 @rnindex display
 @deffn {Scheme Procedure} display obj [port]
-Send a representation of @var{obj} to @var{current-output-port}.
-Optional second arg @var{port} specifies an alternative output port.
-The representation is similar to that produced by @code{write} (REFFIXME),
-the differences being strings are not quoted (and their characters are not
-escaped), and characters are rendered as if with @code{write-char}.
+Send a representation of @var{obj} to @var{port} or to the current
+output port if not given.
+
+The output is designed for human readability, it differs from
+@code{write} in that strings are printed without doublequotes and
+escapes, and characters are printed as per @code{write-char}, not in
+@samp{#\} form.
 @end deffn
 
 @rnindex newline

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

             reply	other threads:[~2003-05-03 23:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-03 23:07 Kevin Ryde [this message]
2003-05-04  0:14 ` doco write and display Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871xzfmxy1.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).