(Writing): Add write, revise display.
authorKevin Ryde <user42@zip.com.au>
Sun, 4 May 2003 00:40:13 +0000 (00:40 +0000)
committerKevin Ryde <user42@zip.com.au>
Sun, 4 May 2003 00:40:13 +0000 (00:40 +0000)
doc/ref/scheme-io.texi

index 8163fb0..9131e78 100644 (file)
@@ -180,13 +180,26 @@ Return the print state of the port @var{port}.  If @var{port}
 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