UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

254 lines 52.4 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Basic input/output stream operations &mdash; The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="streams.html">&#x2191;</a><a class="lpdoc-navbutton" href="stream_basic.html">&#x2190;</a><a class="lpdoc-navbutton" href="stream_utils.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaosearch.html">&#x1F50D;</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> &raquo;<br/> </li><li><a href="StdLibs.html">PART VII - Standard libraries</a> &raquo;<br/> </li><li><a href="streams.html">Stream handling and operations</a> &raquo;<br/> </li><li><a href=""><strong>Basic input/output stream operations</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Usage and interface">Usage and interface</a></li><li><a href="#Documentation on exports">Documentation on exports</a></li><li><a href="#Documentation on imports">Documentation on imports</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Basic input/output stream operations</h1><a class="lpdoc-idx-anchor" href="ciaosearch.html#io_basic"></a> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Daniel Cabeza" href="ciaosearch.html#Daniel Cabeza">Daniel Cabeza</a>, <a class="lpdoc-idx-anchor" id="Mats Carlsson" href="ciaosearch.html#Mats Carlsson">Mats Carlsson</a>, <a class="lpdoc-idx-anchor" id="Jose F. Morales" href="ciaosearch.html#Jose F. Morales">Jose F. Morales (minor)</a>.<p> This module provides the basic input/output operations on streams (byte/code input/output and canonical term output). Most predicates are provided in two versions: one that specifies the input or output stream as the first argument and a second which omits this argument and uses the current input or output stream.<p>From the <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#ISO-Prolog">ISO-Prolog</a> predicates for character input/output, only the <tt>_code</tt> versions are provided, the <tt>_char</tt> versions are given by <a class="lpdoc-idx-anchor" id="1" href="ciaosearch.html#library(iso_char)"><tt>library(iso_char)</tt></a>.<br/><div id="Usage and interface"><h2>Usage and interface</h2><div class="lpdoc-cartouche"><ul><li><strong>Library usage:</strong><br/><tt>:- use_module(engine(io_basic)).</tt><li><strong>Exports:</strong><br/><ul class="lpdoc-itemize-minus"><li><em>Predicates:</em><br/><a class="lpdoc-idx-anchor" id="2" href="iso_incomplete.html#get_code/2"><tt>get_code/2</tt></a>, <a class="lpdoc-idx-anchor" id="3" href="#get_code/1"><tt>get_code/1</tt></a>, <a class="lpdoc-idx-anchor" id="4" href="#get1_code/2"><tt>get1_code/2</tt></a>, <a class="lpdoc-idx-anchor" id="5" href="#get1_code/1"><tt>get1_code/1</tt></a>, <a class="lpdoc-idx-anchor" id="6" href="iso_incomplete.html#peek_code/2"><tt>peek_code/2</tt></a>, <a class="lpdoc-idx-anchor" id="7" href="#peek_code/1"><tt>peek_code/1</tt></a>, <a class="lpdoc-idx-anchor" id="8" href="#skip_code/2"><tt>skip_code/2</tt></a>, <a class="lpdoc-idx-anchor" id="9" href="#skip_code/1"><tt>skip_code/1</tt></a>, <a class="lpdoc-idx-anchor" id="10" href="#skip_line/1"><tt>skip_line/1</tt></a>, <a class="lpdoc-idx-anchor" id="11" href="#skip_line/0"><tt>skip_line/0</tt></a>, <a class="lpdoc-idx-anchor" id="12" href="iso_incomplete.html#put_code/2"><tt>put_code/2</tt></a>, <a class="lpdoc-idx-anchor" id="13" href="#put_code/1"><tt>put_code/1</tt></a>, <a class="lpdoc-idx-anchor" id="14" href="iso_incomplete.html#nl/1"><tt>nl/1</tt></a>, <a class="lpdoc-idx-anchor" id="15" href="#nl/0"><tt>nl/0</tt></a>, <a class="lpdoc-idx-anchor" id="16" href="iso_incomplete.html#tab/2"><tt>tab/2</tt></a>, <a class="lpdoc-idx-anchor" id="17" href="#tab/1"><tt>tab/1</tt></a>, <a class="lpdoc-idx-anchor" id="18" href="#code_class/2"><tt>code_class/2</tt></a>, <a class="lpdoc-idx-anchor" id="19" href="#string_bytes/2"><tt>string_bytes/2</tt></a>, <a class="lpdoc-idx-anchor" id="20" href="#getct/2"><tt>getct/2</tt></a>, <a class="lpdoc-idx-anchor" id="21" href="#getct1/2"><tt>getct1/2</tt></a>, <a class="lpdoc-idx-anchor" id="22" href="iso_incomplete.html#get_byte/2"><tt>get_byte/2</tt></a>, <a class="lpdoc-idx-anchor" id="23" href="#get_byte/1"><tt>get_byte/1</tt></a>, <a class="lpdoc-idx-anchor" id="24" href="iso_incomplete.html#peek_byte/2"><tt>peek_byte/2</tt></a>, <a class="lpdoc-idx-anchor" id="25" href="#peek_byte/1"><tt>peek_byte/1</tt></a>, <a class="lpdoc-idx-anchor" id="26" href="iso_incomplete.html#put_byte/2"><tt>put_byte/2</tt></a>, <a class="lpdoc-idx-anchor" id="27" href="#put_byte/1"><tt>put_byte/1</tt></a>, <a class="lpdoc-idx-anchor" id="28" href="#at_end_of_stream/0"><tt>at_end_of_stream/0</tt></a>, <a class="lpdoc-idx-anchor" id="29" href="iso_incomplete.html#at_end_of_stream/1"><tt>at_end_of_stream/1</tt></a>, <a class="lpdoc-idx-anchor" id="30" href="iso_incomplete.html#display/2"><tt>display/2</tt></a>, <a class="lpdoc-idx-anchor" id="31" href="#display/1"><tt>display/1</tt></a>, <a class="lpdoc-idx-anchor" id="32" href="iso_incomplete.html#displayq/2"><tt>displayq/2</tt></a>, <a class="lpdoc-idx-anchor" id="33" href="#displayq/1"><tt>displayq/1</tt></a>, <a class="lpdoc-idx-anchor" id="34" href="iso_incomplete.html#at_end_of_stream/1"><tt>at_end_of_stream/1</tt></a>, <a class="lpdoc-idx-anchor" id="35" href="#at_end_of_stream/0"><tt>at_end_of_stream/0</tt></a>. </ul></ul></div></div><div id="Documentation on exports"><h2>Documentation on exports</h2><div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_code/2" href="ciaosearch.html#get_code/2">get_code/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>get_code(Stream,Code)</tt> </span><p>Reads from <span class="lpdoc-var">Stream</span> the next character and unifies <span class="lpdoc-var">Code</span> with its character code. At end of stream, unifies <span class="lpdoc-var">Code</span> with the integer -1.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="36" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="37" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="38" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="39" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_code/1" href="ciaosearch.html#get_code/1">get_code/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>get_code(Code)</tt> </span><p>Behaves like <tt>current_input(S), get_code(S,Code)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="40" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="41" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="42" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get1_code/2" href="ciaosearch.html#get1_code/2">get1_code/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>get1_code(Stream,Code)</tt> </span><p>Reads from <span class="lpdoc-var">Stream</span> the next non-layout character (see <a class="lpdoc-idx-anchor" id="43" href="#code_class/2"><tt>code_class/2</tt></a>) and unifies <span class="lpdoc-var">Code</span> with its character code. At end of stream, unifies <span class="lpdoc-var">Code</span> with the integer -1.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="44" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="45" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="46" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="47" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get1_code/1" href="ciaosearch.html#get1_code/1">get1_code/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>get1_code(Code)</tt> </span><p>Behaves like <tt>current_input(S), get1_code(S,Code)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="48" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="49" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="50" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="peek_code/2" href="ciaosearch.html#peek_code/2">peek_code/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>peek_code(Stream,Code)</tt> </span><p>Unifies <span class="lpdoc-var">Code</span> with the character code of the next character of <span class="lpdoc-var">Stream</span>, leaving the stream position unaltered. At end of stream, unifies <span class="lpdoc-var">Code</span> with the integer -1.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="51" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="52" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="53" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="peek_code/1" href="ciaosearch.html#peek_code/1">peek_code/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>peek_code(Code)</tt> </span><p>Behaves like <tt>current_input(S), peek_code(S,Code)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="54" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="55" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="skip_code/2" href="ciaosearch.html#skip_code/2">skip_code/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>skip_code(Stream,Code)</tt> </span><p>Skips just past the next character code <span class="lpdoc-var">Code</span> from <span class="lpdoc-var">Stream</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="56" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="57" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="skip_code/1" href="ciaosearch.html#skip_code/1">skip_code/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>skip_code(Code)</tt> </span><p>Behaves like <tt>current_input(S), skip_code(S,Code)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="58" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="skip_line/1" href="ciaosearch.html#skip_line/1">skip_line/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>skip_line(Stream)</tt> </span><p>Skips from <span class="lpdoc-var">Stream</span> the remaining input characters on the current line. If the end of the stream is reached, the stream will stay at its end. Portable among different operating systems.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="59" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="skip_line/0" href="ciaosearch.html#skip_line/0">skip_line/0</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>skip_line</tt> </span><p>Behaves like <tt>current_input(S), skip_line(S)</tt>.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="put_code/2" href="ciaosearch.html#put_code/2">put_code/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>put_code(Stream,Code)</tt> </span><p>Outputs to <span class="lpdoc-var">Stream</span> the character corresponding to character code <span class="lpdoc-var">Code</span>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="60" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="61" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="62" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="63" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">put_code(Stream,Code)</span> are deterministic. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="put_code/1" href="ciaosearch.html#put_code/1">put_code/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>put_code(Code)</tt> </span><p>Behaves like <tt>current_output(S), put_code(S,Code)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="64" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="65" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="66" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">put_code(Code)</span> are deterministic. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="nl/1" href="ciaosearch.html#nl/1">nl/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>nl(Stream)</tt> </span><p>Outputs a newline character to <span class="lpdoc-var">Stream</span>. Equivalent to <tt>put_code(Stream, 0&apos;\n)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="67" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="68" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="69" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">nl(Stream)</span> are deterministic. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="70" href="native_props_nfdet_doc.html#not_fails/1"><tt>native_props:not_fails/1</tt></a>)</span><span>All the calls of the form <span class="lpdoc-var">nl(Stream)</span> do not fail. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="nl/0" href="ciaosearch.html#nl/0">nl/0</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>nl</tt> </span><p>Behaves like <tt>current_output(S), nl(S)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="71" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="72" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">nl</span> are deterministic. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="73" href="native_props_nfdet_doc.html#not_fails/1"><tt>native_props:not_fails/1</tt></a>)</span><span>All the calls of the form <span class="lpdoc-var">nl</span> do not fail. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="74" href="native_props_cardinality_doc.html#relations/2"><tt>native_props:relations/2</tt></a>)</span><span>Goal <span class="lpdoc-var">nl</span> produces <span class="lpdoc-var">1</span> solutions. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="tab/2" href="ciaosearch.html#tab/2">tab/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>tab(Stream,Num)</tt> </span><p>Outputs <span class="lpdoc-var">Num</span> spaces to <span class="lpdoc-var">Stream</span>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="75" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="76" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Num</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="77" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="78" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">tab(Stream,Num)</span> are deterministic. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="tab/1" href="ciaosearch.html#tab/1">tab/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>tab(Num)</tt> </span><p>Behaves like <tt>current_output(S), tab(S,Num)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="79" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Num</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="80" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="81" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">tab(Num)</span> are deterministic. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="code_class/2" href="ciaosearch.html#code_class/2">code_class/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>code_class(Code,Class)</tt> </span><p>Unifies <span class="lpdoc-var">Class</span> with an integer corresponding to the lexical class of the character whose code is <span class="lpdoc-var">Code</span>, with the following correspondence: <pre class="lpdoc-codeblock"> 0 - layout (includes space, newline, tab) 1 - small letter 2 - capital letter (including &apos;_&apos;) 3 - digit 4 - graphic (includes #$&amp;*+-./:&lt;=&gt;?@^\`~ ) 5 - punctuation (includes !;&quot;&apos;%(),[]{|} ) 6 - extended identifier continuation 7 - invalid </pre> Note that in <a class="lpdoc-idx-anchor" id="82" href="ciaosearch.html#ISO-Prolog">ISO-Prolog</a> the back quote <tt>`</tt> is a punctuation character, whereas in Ciao it is a graphic character. Thus, if compatibility with <a class="lpdoc-idx-anchor" id="83" href="ciaosearch.html#ISO-Prolog">ISO-Prolog</a> is desired, the programmer should not use this character in unquoted names.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="84" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Class</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="85" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="86" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Class</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="string_bytes/2" href="ciaosearch.html#string_bytes/2">string_bytes/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>string_bytes(String,Bytes)</tt> </span><p><span class="lpdoc-var">String</span> is the list of the character codes encoded by the list of bytes <span class="lpdoc-var">Bytes</span> (equivalent to <tt>String=Bytes</tt> if any of the lists is a list of ASCII codes).</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="getct/2" href="ciaosearch.html#getct/2">getct/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>getct(Code,Type)</tt> </span><p>Reads from the current input stream the next character, unifying <span class="lpdoc-var">Code</span> with its character code, and <span class="lpdoc-var">Type</span> with its lexical class. At end of stream, unifies both <span class="lpdoc-var">Code</span> and <span class="lpdoc-var">Type</span> with the integer -1. Equivalent to <pre class="lpdoc-codeblock"> get(Code), (Code = -1 -&gt; Type = -1 ; code_class(Code,Type)) </pre><p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="87" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="88" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Type</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="89" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="90" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Type</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="getct1/2" href="ciaosearch.html#getct1/2">getct1/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>getct1(Code,Type)</tt> </span><p>Reads from the current input stream the next non-layout character, unifying <span class="lpdoc-var">Code</span> with its character code, and <span class="lpdoc-var">Type</span> with its lexical class (which will be nonzero). At end of stream, unifies both <span class="lpdoc-var">Code</span> and <span class="lpdoc-var">Type</span> with the integer -1. Equivalent to <pre class="lpdoc-codeblock"> get1(Code), (Code = -1 -&gt; Type = -1 ; code_class(Code,Type)) </pre><p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="91" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="92" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Type</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="93" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Code</span> is an integer. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="94" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Type</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_byte/2" href="ciaosearch.html#get_byte/2">get_byte/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>get_byte(Stream,Byte)</tt> </span><p>Reads from <span class="lpdoc-var">Stream</span> the next byte and unifies it with <span class="lpdoc-var">Byte</span>. At end of stream, unifies <span class="lpdoc-var">Byte</span> with the integer -1.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="95" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="96" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="97" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="98" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="get_byte/1" href="ciaosearch.html#get_byte/1">get_byte/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>get_byte(Byte)</tt> </span><p>Behaves like <tt>current_input(S), get_byte(S,Byte)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="99" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="100" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="101" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="peek_byte/2" href="ciaosearch.html#peek_byte/2">peek_byte/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>peek_byte(Stream,Byte)</tt> </span><p>Unifies <span class="lpdoc-var">Byte</span> with the next byte of <span class="lpdoc-var">Stream</span>, leaving the stream position unaltered. At end of stream, unifies <span class="lpdoc-var">Byte</span> with the integer -1.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="102" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="103" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="104" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="peek_byte/1" href="ciaosearch.html#peek_byte/1">peek_byte/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>peek_byte(Byte)</tt> </span><p>Behaves like <tt>current_input(S), peek_byte(S,Byte)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>Calls should, and exit will be compatible with:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="105" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="106" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="put_byte/2" href="ciaosearch.html#put_byte/2">put_byte/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>put_byte(Stream,Byte)</tt> </span><p>Outputs to <span class="lpdoc-var">Stream</span> the byte <span class="lpdoc-var">Byte</span>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="107" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="108" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="109" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="put_byte/1" href="ciaosearch.html#put_byte/1">put_byte/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>put_byte(Byte)</tt> </span><p>Behaves like <tt>current_output(S), put_byte(S,Byte)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="110" href="basic_props.html#int/1"><tt>basic_props:int/1</tt></a>)</span><span><span class="lpdoc-var">Byte</span> is an integer. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="111" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="112" href="native_props_nfdet_doc.html#is_det/1"><tt>native_props:is_det/1</tt></a>)</span><span>All calls of the form <span class="lpdoc-var">put_byte(Byte)</span> are deterministic. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="at_end_of_stream/0" href="ciaosearch.html#at_end_of_stream/0">at_end_of_stream/0</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>at_end_of_stream</tt> </span><p>Behaves like <tt>current_input(S), at_end_of_stream(S)</tt>.</div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="at_end_of_stream/1" href="ciaosearch.html#at_end_of_stream/1">at_end_of_stream/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>at_end_of_stream(Stream)</tt> </span><p><span class="lpdoc-var">Stream</span> has a stream position end-of-stream or past-end-of-stream. This predicate is provided for ISO compatibility, but its usage is discouraged, since it cannot reliably detect that no more data is available in the stream (e.g., without blocking). Use <a class="lpdoc-idx-anchor" id="113" href="iso_incomplete.html#peek_byte/2"><tt>peek_byte/2</tt></a> or <a class="lpdoc-idx-anchor" id="114" href="iso_incomplete.html#peek_code/2"><tt>peek_code/2</tt></a> instead.<p><span class="lpdoc-usage-header">Usage:</span><span class="lpdoc-usage-decl"><span class="lpdoc-on-right"><span class="lpdoc-iso">ISO</span></span><span></span> </span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="115" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="display/2" href="ciaosearch.html#display/2">display/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>display(Stream,Term)</tt> </span><p>Displays <span class="lpdoc-var">Term</span> onto <span class="lpdoc-var">Stream</span>. Lists are output using list notation, the other compound terms are output in functional notation. Similar to <tt>write_term(Stream, Term, [ignore_ops(ops)])</tt>, except that curly bracketed notation is not used with <tt>{}/1</tt>, and the <tt>write_strings</tt> flag is not honored.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="116" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="117" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="118" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="119" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="120" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="display/1" href="ciaosearch.html#display/1">display/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>display(Term)</tt> </span><p>Behaves like <tt>current_output(S), display(S,Term)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="121" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="122" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="123" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term</span> is not further instantiated. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="124" href="basic_props.html#native/1"><tt>basic_props:native/1</tt></a>)</span><span>This predicate is understood natively by CiaoPP. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="displayq/2" href="ciaosearch.html#displayq/2">displayq/2</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>displayq(Stream,Term)</tt> </span><p>Similar to <tt>display(Stream, Term)</tt>, but atoms and functors that can&apos;t be read back by <a class="lpdoc-idx-anchor" id="125" href="iso_incomplete.html#read_term/3"><tt>read_term/3</tt></a> are quoted. Thus, similar to <tt>write_term(Stream, Term, [quoted(true), ignore_ops(ops)])</tt>, with the same exceptions as <a class="lpdoc-idx-anchor" id="126" href="iso_incomplete.html#display/2"><tt>display/2</tt></a>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="127" href="stream_basic.html#stream/1"><tt>stream_basic:stream/1</tt></a>)</span><span><span class="lpdoc-var">Stream</span> is an open stream. </span><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="128" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="129" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="130" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term</span> is not further instantiated. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="displayq/1" href="ciaosearch.html#displayq/1">displayq/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>displayq(Term)</tt> </span><p>Behaves like <tt>current_output(S), displayq(S,Term)</tt>.<p><span class="lpdoc-usage-header">Usage:</span><p></p><ul class="lpdoc-itemize-minus"><li><em>The following properties should hold at call time:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="131" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold upon exit:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="132" href="basic_props.html#term/1"><tt>basic_props:term/1</tt></a>)</span><span><span class="lpdoc-var">Term</span> is any term. </span> <li><em>The following properties hold globally:</em><br/><span class="lpdoc-on-right"> (<a class="lpdoc-idx-anchor" id="133" href="basic_props.html#not_further_inst/2"><tt>basic_props:not_further_inst/2</tt></a>)</span><span><span class="lpdoc-var">Term</span> is not further instantiated. </span> </ul></div></div><p> <div><div class="lpdoc-defname"><span class="lpdoc-predtag">PREDICATE</span><a class="lpdoc-idx-anchor" id="at_end_of_stream/1" href="ciaosearch.html#at_end_of_stream/1">at_end_of_stream/1</a></div><div class="lpdoc-deftext"><span class="lpdoc-usage-decl"><tt>at_end_of_stream(Stream)</tt> </span><p><span class="lpdoc-var">Stream</span> has a stream position end-of-stream or past-end-of-stream. This predicate is provided for ISO compatibility, but its usage is discouraged, since it can