Revision of help pages for bytecode function
[scilab.git] / scilab / modules / functions / help / en_US / bytecode.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 Serge Steer
5  *
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at
10  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
11  *-->
12 <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="bytecode">
13     <refnamediv>
14         <refname>bytecode</refname>
15         <refpurpose>given a function returns the "bytecode" of a function in a Scilab array and conversely. </refpurpose>
16     </refnamediv>
17     <refsynopsisdiv>
18         <title>Calling Sequence</title>
19         <synopsis>
20             x = bytecode(f)
21             f = bytecode(x)
22         </synopsis>
23     </refsynopsisdiv>
24     <refsection>
25         <title>Arguments</title>
26         <variablelist>
27             <varlistentry>
28                 <term>f</term>
29                 <listitem>
30                     <para>
31                         A Scilab function.
32                     </para>
33                 </listitem>
34             </varlistentry>
35             <varlistentry>
36                 <term>x</term>
37                 <listitem>
38                     <para>
39                         an int32 row vector
40                     </para>
41                 </listitem>
42             </varlistentry>
43         </variablelist>
44     </refsection>
45     <refsection>
46         <title>Description</title>
47         <para>
48             <code>x = bytecode(f)</code> returns the "bytecode" of
49             the function <varname>f</varname> in the Scilab integer array
50             <varname>x</varname>.
51         </para>
52         <para>
53             <code>f= bytecode(x)</code> returns in
54             <varname>f</varname> the function associated with the
55             "bytecode" given in the Scilab integer array
56             <varname>x</varname>.
57             <warning>
58                 Warning: the validity of <varname>x</varname> is not checked.
59             </warning>
60         </para>
61     </refsection>
62     <refsection>
63         <title>Remark</title>
64         <para>
65             The bytecode of Scilab function will evolve drastically in the
66             future, so the use of this function should be restricted to the
67             profiling instruction handling.
68         </para>
69     </refsection>
70     <refsection>
71         <title>Examples</title>
72         <programlisting role="example"><![CDATA[
73 function a=foo(),a=sin(3),endfunction
74 bytecode(foo)
75  ]]></programlisting>
76     </refsection>
77     <refsection role="see also">
78         <title>See Also</title>
79         <simplelist type="inline">
80             <member>
81                 <link linkend="add_profiling">add_profiling</link>
82             </member>
83             <member>
84                 <link linkend="bytecodewalk">bytecodewalk</link>
85             </member>
86             <member>
87                 <link linkend="macr2lst">macr2lst</link>
88             </member>
89             <member>
90                 <link linkend="macr2tree">macr2tree</link>
91             </member>
92         </simplelist>
93     </refsection>
94 </refentry>