Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2250

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - Accessing and redirecting the stream aliases</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_70.html">previous</A>, <A HREF="ciao_72.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC310" HREF="ciao_toc.html#TOC310">Accessing and redirecting the stream aliases</A></H1>
<P>
<A NAME="IDX4436"></A>


<P>
<STRONG>Author(s):</STRONG> Manuel Carro.


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.7#52 (2001/1/26, 15:34:13 CET)


<P>
This library allows the redefinition of the files to which the special streams <CODE>user_input</CODE>, <CODE>user_output</CODE>, and <CODE>user_error</CODE> point to. On startup they point to the standard input, standard output, and standard error, in Unix style (Windows users may find that standard error stream does not work properly). Changing the file pointed to is useful for, e.g., redirecting the place to which the Prolog's standard error stream goes from within Prolog (e.g., to start a log file).



<UL>
<LI><A HREF="ciao_71.html#SEC311">Usage and interface (io_alias_redirection)</A>
<LI><A HREF="ciao_71.html#SEC312">Documentation on exports (io_alias_redirection)</A>
</UL>



<H2><A NAME="SEC311" HREF="ciao_toc.html#TOC311">Usage and interface (<CODE>io_alias_redirection</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(io_alias_redirection)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX4437"></A>
<CODE>set_stream/3</CODE>, 
<A NAME="IDX4438"></A>
<CODE>get_stream/2</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC312" HREF="ciao_toc.html#TOC312">Documentation on exports (<CODE>io_alias_redirection</CODE>)</A></H2>
<P>
<A NAME="IDX4439"></A>
<A NAME="IDX4440"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>set_stream/3:</B>
<DD><A NAME="IDX4441"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>set_stream(+StreamAlias, +NewStream, ?OldStream)</CODE>

<UL>
<LI><EM>Description:</EM> Associate <CODE>StreamAlias</CODE> with an open stream <CODE>newStream</CODE>. Returns in <CODE>OldStream</CODE> the stream previusly associated with the alias. The mode of <CODE>NewStream</CODE> must match the intended use of <CODE>StreamAlias</CODE>.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>+StreamAlias</CODE> is the alias of an open stream, i.e., an atom which represents a stream at Prolog level.
 (<CODE>streams_basic:stream_alias/1</CODE>)

<CODE>+NewStream</CODE> is an open stream.
 (<CODE>streams_basic:stream/1</CODE>)

<CODE>?OldStream</CODE> is an open stream.
 (<CODE>streams_basic:stream/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX4442"></A>
<A NAME="IDX4443"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_stream/2:</B>
<DD><A NAME="IDX4444"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_stream(+StreamAlias, ?Stream)</CODE>

<UL>
<LI><EM>Description:</EM> Return in <CODE>Stream</CODE> the stream associated with <CODE>StreamAlias</CODE>.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>+StreamAlias</CODE> is the alias of an open stream, i.e., an atom which represents a stream at Prolog level.
 (<CODE>streams_basic:stream_alias/1</CODE>)

<CODE>?Stream</CODE> is an open stream.
 (<CODE>streams_basic:stream/1</CODE>)
</UL>

</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_70.html">previous</A>, <A HREF="ciao_72.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>