<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2009 - DIGITEO - Allan CORNET
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
          xmlns:scilab="http://www.scilab.org" xml:id="percentio" xml:lang="en">
    <refnamediv>
        <refname>%io</refname>
        <refpurpose>protected variable providing ids of the standard input and standard output
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            %io(1)
            %io(2)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Description</title>
        <para>
            <code>%io(1)</code> returns standard input (file descriptor 5).
        </para>
        <para>
            <code>%io(2)</code> returns standard output (file descriptor 6).
        </para>
        <para>File descriptor 0 is the standard error.</para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
mfprintf(%io(2),'Scilab stdout (C)');
mfprintf(0,'Scilab stderr (C)');
write(%io(2),'Scilab stdout (Fortran)');
write(0,'Scilab stderr (Fortran)');
[units,typ,names]=file()
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="getio">getio</link>
            </member>
            <member>
                <link linkend="consolebox">consolebox</link>
            </member>
            <member>
                <link linkend="write">write</link>
            </member>
            <member>
                <link linkend="mprintf">mprintf</link>
            </member>
            <member>
                <link linkend="file">file</link>
            </member>
            <member>
                <link linkend="dispfiles">dispfiles</link>
            </member>
        </simplelist>
    </refsection>
    <refsection role="history">
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>6.0.0</revnumber>
                <revdescription>
                   <literal>%io</literal> is now protected (read-only).
                </revdescription>
            </revision>
        </revhistory>
    </refsection>
</refentry>
