<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * 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:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ru" xml:id="do">
    <refnamediv>
        <refname>do</refname>
        <refpurpose>ключевое слово для циклов</refpurpose>
    </refnamediv>
    <refsection>
        <title>Описание</title>
        <para>
            Может использоваться внутри циклов <literal>for</literal>
            или <literal>while</literal> для отделения определения
            переменной цикла и набором инструкций.
        </para>
    </refsection>
    <refsection>
        <title>Примеры</title>
        <programlisting role="example"><![CDATA[
      i = 0
      while i<5 do
          disp("i");
          i = i + 1;
      end
 ]]></programlisting>
        <programlisting role="example"><![CDATA[
n=5;
for i = 1:n do
    for j = 1:n do
        a(i,j) = 1/(i+j-1);
    end;
end

 ]]></programlisting>
    </refsection>

    <refsection role="see also">
        <title>Смотрите также</title>
        <simplelist type="inline">
            <member>
                <link linkend="for">for</link>
            </member>
            <member>
                <link linkend="while">while</link>
            </member>
        </simplelist>
    </refsection>
    <refsection role="history">
        <title>История</title>
        <revhistory>
            <revision>
                <revnumber>6.0.0</revnumber>
                <revdescription>
                  <literal>do</literal> is now protected:
                  Assignments like <literal>do=1</literal> are no longer possible.
                </revdescription>
            </revision>
        </revhistory>
    </refsection>
</refentry>
