* Bug #6037 fixed - Functions doc: macrovar()
[scilab.git] / scilab / modules / functions / help / en_US / macrovar.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  * 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  -->
13 <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="macrovar">
14     <refnamediv>
15         <refname>macrovar</refname>
16         <refpurpose>variables of function</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>vars = macrovar(function)</synopsis>
21     </refsynopsisdiv>
22     <refsection>
23         <title>Arguments</title>
24         <variablelist>
25             <varlistentry>
26                 <term>vars</term>
27                 <listitem>
28                     <para>
29                         list,  <literal>list(in, out, nolocal, called, locals)</literal>
30                     </para>
31                 </listitem>
32             </varlistentry>
33             <varlistentry>
34                 <term>function</term>
35                 <listitem>
36                     <para>name of a function</para>
37                 </listitem>
38             </varlistentry>
39         </variablelist>
40     </refsection>
41     <refsection>
42         <title>Description</title>
43         <para>
44             Returns in a list the set of variables used by a function.
45             <literal>vars</literal> is a list made of five column vectors of character strings:
46         </para>
47         <simplelist type="inline">
48             <member>
49                 <literal>in</literal>: input variables (<literal>vars(1)</literal>)
50             </member>
51             <member>
52                 <literal>out</literal>: output variables (<literal>vars(2)</literal>)
53             </member>
54             <member>
55                 <literal>nolocal</literal>: referenced variables which are not defined inside the function and which are not functions (<literal>vars(3)</literal>)
56             </member>
57             <member>
58                 <literal>called</literal>: names of functions called (<literal>vars(4)</literal>)
59             </member>
60             <member>
61                 <literal>locals</literal>: local variables (<literal>vars(5)</literal>)
62             </member>
63         </simplelist>
64     </refsection>
65     <refsection>
66         <title>Examples</title>
67         <programlisting role="example"><![CDATA[
68 deff('y = f(x1, x2)', 'loc = 1; y = a*x1+x2-loc');
69 vars = macrovar(f)
70  ]]></programlisting>
71     </refsection>
72     <refsection role="see also">
73         <title>See Also</title>
74         <simplelist type="inline">
75             <member>
76                 <link linkend="string">string</link>
77             </member>
78             <member>
79                 <link linkend="macr2lst">macr2lst</link>
80             </member>
81         </simplelist>
82     </refsection>
83 </refentry>