Merge remote-tracking branch 'origin/6.1'
[scilab.git] / scilab / modules / core / help / ru_RU / 2_control_flow / end.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"
17         xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
18         xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
19         xml:lang="ru" xml:id="end">
20     <refnamediv>
21         <refname>end</refname>
22         <refpurpose>ключевое слово конца конструкции</refpurpose>
23     </refnamediv>
24     <refsection>
25         <title>Описание</title>
26         <para>
27             Используется в конце конструкций циклов или условий.
28             Конструкции <literal>for</literal>, <literal>while</literal>, <literal>if</literal>,
29             <literal>select</literal> должны заканчиваться ключевым словом <literal>end</literal>.
30         </para>
31     </refsection>
32     <refsection>
33         <title>Примеры</title>
34         <programlisting role="example"><![CDATA[
35 a=42
36 if a==42 then
37    disp("Ответ на все вопросы.")
38 end
39
40 i = 0
41 while i<5
42    disp("i");
43    i = i + 1;
44 end
45
46 n=5;
47 for i = 1:n
48     for j = 1:n
49         a(i,j) = 1/(i+j-1);
50     end;
51 end
52  ]]></programlisting>
53     </refsection>
54     <refsection role="see also">
55         <title>Смотрите также</title>
56         <simplelist type="inline">
57             <member>
58                 <link linkend="endfunction">endfunction</link>
59             </member>
60             <member>
61                 <link linkend="break">break</link>
62             </member>
63             <member>
64                 <link linkend="continue">continue</link>
65             </member>
66             <member>
67                 <link linkend="dollar">доллар</link>
68             </member>
69             <member>
70                 <link linkend="comma">запятая</link>
71             </member>
72             <member>
73                 <link linkend="semicolon">точка с запятой</link>
74             </member>
75             <member>
76                 <link linkend="for">for</link>
77             </member>
78             <member>
79                 <link linkend="while">while</link>
80             </member>
81             <member>
82                 <link linkend="if">if</link>
83             </member>
84             <member>
85                 <link linkend="select">select</link>
86             </member>
87         </simplelist>
88     </refsection>
89     <refsection role="history">
90         <title>История</title>
91         <revhistory>
92             <revision>
93                 <revnumber>6.0.0</revnumber>
94                 <revdescription>
95                     <itemizedlist>
96                         <listitem>
97                             Больше не нужно ставить <literal>,</literal> или <literal>;</literal> после
98                             <literal>end</literal> в инструкции одной строкой в качестве разделителя
99                             (например, <literal>if %t, a=1; end b=2</literal>).
100                         </listitem>
101                         <listitem>
102                             <literal>end</literal> теперь может закрыть блок <literal>function</literal>
103                             вместо <literal>endfunction</literal> (это может быть все же предпочтительнее).
104                         </listitem>
105                         <listitem>
106                             <literal>end</literal> is now protected:
107                             Assignments like <literal>end=1</literal> are no longer possible.
108                         </listitem>
109                     </itemizedlist>
110                 </revdescription>
111             </revision>
112         </revhistory>
113     </refsection>
114 </refentry>