Add also the examples in core help pages in the russian help page (port of modificati...
[scilab.git] / scilab / modules / core / help / en_US / keywords / end.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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="en" xml:id="end">
3     <refnamediv>
4         <refname>end</refname>
5         <refpurpose>end keyword</refpurpose>
6     </refnamediv>
7     <refsection>
8         <title>Description</title>
9         <para>
10             Used at end of loops or conditionals.
11             <literal>for</literal>, <literal>while</literal>, <literal>if</literal>, <literal>select</literal> must be terminated by <literal>end</literal>.
12         </para>
13     </refsection>
14     <refsection>
15         <title>Examples</title>
16         <programlisting role="example"><![CDATA[
17 a=42
18 if a==42 then
19    disp("the answer to all questions")
20 end
21
22 i = 0
23 while i<5
24    disp("i");
25    i = i + 1;
26 end
27
28 n=5;
29 for i = 1:n
30     for j = 1:n
31         a(i,j) = 1/(i+j-1);
32     end;
33 end
34
35  ]]></programlisting>
36     </refsection>
37     
38     <refsection role="see also">
39         <title>See Also</title>
40         <simplelist type="inline">
41             <member>
42                 <link linkend="for">for</link>
43             </member>
44             <member>
45                 <link linkend="while">while</link>
46             </member>
47             <member>
48                 <link linkend="if">if</link>
49             </member>
50             <member>
51                 <link linkend="select">select</link>
52             </member>
53         </simplelist>
54     </refsection>
55 </refentry>