d5c3b80594bc53dceb3d78cd632c08608e25d801
[scilab.git] / scilab / modules / core / help / en_US / 1_keywords / comments.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="comments">
3     <refnamediv>
4         <refname>comments</refname>
5         <refpurpose>(//) comments</refpurpose>
6     </refnamediv>
7     <refsection>
8         <title>Description</title>
9         <para>
10             A sequence of two consecutive slashes <literal>//</literal> out of
11             a string definition marks the beginning of a comment. The slashes
12             as well as all the following characters up to the end of the lines
13             are not interpreted.
14         </para>
15         <para>Inside a function, the first comment lines, up to the first
16             instruction or an empty line may be used to provide the default
17             contents for the function help. 
18         </para>
19     </refsection>
20     <refsection>
21         <title>Examples</title>
22         <programlisting role="example"><![CDATA[ 
23 g=9.81// the gravity
24
25 text='a//b'
26
27 function y=myfunction(x)
28   // myfunction computes y=x^2+1
29   // x should be a vector or matrix
30   y=x^2+1
31 endfunction
32
33 help myfunction
34  ]]></programlisting>
35     </refsection>
36     <refsection role="see also">
37         <title>See Also</title>
38         <simplelist type="inline">
39             <member>
40                 <link linkend="slash">slash</link>
41             </member>
42             <member>
43                 <link linkend="backslash">backslash</link>
44             </member>
45         </simplelist>
46     </refsection>
47 </refentry>