Revision of help page for listfunctions function
[scilab.git] / scilab / modules / functions / help / en_US / listfunctions.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="listfunctions">
3     <refnamediv>
4         <refname>listfunctions</refname>
5         <refpurpose>properties of all functions in
6             the workspace
7         </refpurpose>
8     </refnamediv>
9     <refsynopsisdiv>
10         <title>Calling Sequence</title>
11         <synopsis>[flist,compiled,profilable,called] = listfunctions([scope])</synopsis>
12     </refsynopsisdiv>
13     <refsection>
14         <title>Arguments</title>
15         <variablelist>
16             <varlistentry>
17                 <term>scope</term>
18                 <listitem>
19                     <para>
20                         a string, <literal>"local"</literal> (default) or <literal>"global"</literal>.
21                     </para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>flist</term>
26                 <listitem>
27                     <para>
28                         a string array, names of all the function variables in the specified namespace.
29                     </para>
30                 </listitem>
31             </varlistentry>
32             <varlistentry>
33                 <term>compiled</term>
34                 <listitem>
35                     <para>
36                         a boolean array, true if the corresponding element of <varname>flist</varname> is of type 13.
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>profilable</term>
42                 <listitem>
43                     <para>
44                         a boolean array, true if the corresponding element of <varname>flist</varname> is of type 13,
45                         and additionally profiling information is found in the pseudocode of
46                         the function.
47                     </para>
48                 </listitem>
49             </varlistentry>
50             <varlistentry>
51                 <term>called</term>
52                 <listitem>
53                     <para>
54                         an uint32 array, number of times the corresponding element of <varname>flist</varname> has been
55                         already called (nonzero only for profilable functions).
56                     </para>
57                 </listitem>
58             </varlistentry>
59         </variablelist>
60     </refsection>
61     <refsection>
62         <title>Description</title>
63         <itemizedlist>
64             <listitem>
65                 <para>
66                     This function checks all the variables in the workspace (given by
67                     <link linkend="who">who</link>) and collects those of type 11 or 13; for the latter,
68                     <code>lst = macr2lst(fun)</code> is called, in order to check for the magic
69                     profiling entry at the end of the first codeline, i.e. <code>lst(5)(1)=="25"</code>.
70                 </para>
71             </listitem>
72         </itemizedlist>
73     </refsection>
74     <refsection>
75         <title>Examples</title>
76         <programlisting role="example"><![CDATA[
77 recompilefunction("asinh","p")
78 [flist,compiled,profilable,called] = listfunctions();
79 flist(profilable)
80  ]]></programlisting>
81     </refsection>
82     <refsection role="see also">
83         <title>See Also</title>
84         <simplelist type="inline">
85             <member>
86                 <link linkend="function">function</link>
87             </member>
88             <member>
89                 <link linkend="exec">exec</link>
90             </member>
91             <member>
92                 <link linkend="deff">deff</link>
93             </member>
94             <member>
95                 <link linkend="comp">comp</link>
96             </member>
97             <member>
98                 <link linkend="fun2string">fun2string</link>
99             </member>
100             <member>
101                 <link linkend="macr2lst">macr2lst</link>
102             </member>
103             <member>
104                 <link linkend="profile">profile</link>
105             </member>
106             <member>
107                 <link linkend="recompilefunction">recompilefunction</link>
108             </member>
109             <member>
110                 <link linkend="who">who</link>
111             </member>
112         </simplelist>
113     </refsection>
114     <refsection>
115         <title>Bibliography</title>
116         <para>
117             <ulink url="http://wiki.scilab.org/Scilab_function_variables%3A_representation%2C_manipulation">http://wiki.scilab.org/Scilab_function_variables%3A_representation%2C_manipulation</ulink>
118         </para>
119     </refsection>
120 </refentry>