From: Chris Hanson Date: Mon, 29 Feb 2016 01:49:31 +0000 (-0800) Subject: Document port parameters. X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~96 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9e16302dae46e8b7a36c872753cb2d750d5e4360;p=mit-scheme.git Document port parameters. --- diff --git a/doc/ref-manual/io.texi b/doc/ref-manual/io.texi index 6c3bb287c..763b166f3 100644 --- a/doc/ref-manual/io.texi +++ b/doc/ref-manual/io.texi @@ -110,41 +110,43 @@ started, for example by an error, each of these ports is dynamically bound to the @acronym{I/O} port of the @acronym{REP} loop. When the @acronym{REP} loop exits, the ports revert to their original values. -@deffn procedure current-input-port -@findex console-input-port -Returns the current input port. This is the default port used by many -input procedures. Initially, @code{current-input-port} returns the -value of @code{console-i/o-port}. +@deffn parameter current-input-port +Returns the current input port, which is the default port used by many +input procedures. + +This parameter may be called with an argument to set its value. @end deffn -@deffn procedure current-output-port -@findex console-output-port -Returns the current output port. This is the default port used by many -output procedures. Initially, @code{current-output-port} returns the -value of @code{console-i/o-port}. +@deffn parameter current-output-port +Returns the current output port, which is the default port used by +many output procedures. + +This parameter may be called with an argument to set its value. @end deffn -@deffn procedure notification-output-port +@deffn parameter notification-output-port Returns an output port suitable for generating ``notifications'', that is, messages to the user that supply interesting information about the execution of a program. For example, the @code{load} procedure writes messages to this port informing the user that a file is being loaded. -Initially, @code{notification-output-port} returns the value of -@code{console-i/o-port}. + +This parameter may be called with an argument to set its value. @end deffn -@deffn procedure trace-output-port +@deffn parameter trace-output-port Returns an output port suitable for generating ``tracing'' information about a program's execution. The output generated by the @code{trace} -procedure is sent to this port. Initially, @code{trace-output-port} -returns the value of @code{console-i/o-port}. +procedure is sent to this port. + +This parameter may be called with an argument to set its value. @end deffn -@deffn procedure interaction-i/o-port +@deffn parameter interaction-i/o-port Returns an @acronym{I/O} port suitable for querying or prompting the user. The standard prompting procedures use this port by default -(@pxref{Prompting}). Initially, @code{interaction-i/o-port} returns -the value of @code{console-i/o-port}. +(@pxref{Prompting}). + +This parameter may be called with an argument to set its value. @end deffn @deffn procedure with-input-from-port input-port thunk @@ -152,6 +154,9 @@ the value of @code{console-i/o-port}. @deffnx procedure with-notification-output-port output-port thunk @deffnx procedure with-trace-output-port output-port thunk @deffnx procedure with-interaction-i/o-port i/o-port thunk +These procedures are @strong{deprecated}; instead use +@code{parameterize} on the corresponding parameters. + @var{Thunk} must be a procedure of no arguments. Each of these procedures binds one of the standard ports to its first argument, calls @var{thunk} with no arguments, restores the port to its original value, @@ -173,6 +178,9 @@ and @code{with-interaction-i/o-port} binds the ``interaction'' @deffnx procedure set-notification-output-port! output-port @deffnx procedure set-trace-output-port! output-port @deffnx procedure set-interaction-i/o-port! i/o-port +These procedures are @strong{deprecated}; instead call the +corresponding parameters with an argument. + Each of these procedures alters the binding of one of the standard ports and returns an unspecified value. The binding that is modified corresponds to the name of the procedure.