Merge remote-tracking branch 'origin/6.1'
[scilab.git] / scilab / modules / core / help / ru_RU / 2_control_flow / do.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <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">
17     <refnamediv>
18         <refname>do</refname>
19         <refpurpose>ключевое слово для циклов</refpurpose>
20     </refnamediv>
21     <refsection>
22         <title>Описание</title>
23         <para>
24             Может использоваться внутри циклов <literal>for</literal>
25             или <literal>while</literal> для отделения определения
26             переменной цикла и набором инструкций.
27         </para>
28     </refsection>
29     <refsection>
30         <title>Примеры</title>
31         <programlisting role="example"><![CDATA[
32       i = 0
33       while i<5 do
34           disp("i");
35           i = i + 1;
36       end
37  ]]></programlisting>
38         <programlisting role="example"><![CDATA[
39 n=5;
40 for i = 1:n do
41     for j = 1:n do
42         a(i,j) = 1/(i+j-1);
43     end;
44 end
45
46  ]]></programlisting>
47     </refsection>
48
49     <refsection role="see also">
50         <title>Смотрите также</title>
51         <simplelist type="inline">
52             <member>
53                 <link linkend="for">for</link>
54             </member>
55             <member>
56                 <link linkend="while">while</link>
57             </member>
58         </simplelist>
59     </refsection>
60     <refsection role="history">
61         <title>История</title>
62         <revhistory>
63             <revision>
64                 <revnumber>6.0.0</revnumber>
65                 <revdescription>
66                   <literal>do</literal> is now protected:
67                   Assignments like <literal>do=1</literal> are no longer possible.
68                 </revdescription>
69             </revision>
70         </revhistory>
71     </refsection>
72 </refentry>