* Categories have been created for the following modules help pages:
[scilab.git] / scilab / modules / core / help / en_US / variables / clear.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" version="5.0-subset Scilab" xml:lang="en" xml:id="clear">
3   <refnamediv>
4     <refname>clear</refname>
5     <refpurpose>kills variables</refpurpose>
6   </refnamediv>
7   <refsynopsisdiv>
8     <title>Calling Sequence</title>
9     <synopsis>
10       clear a b c
11       clear('a','b','c')
12     </synopsis>
13   </refsynopsisdiv>
14   <refsection>
15     <title>Arguments</title>
16     <variablelist>
17       <varlistentry>
18         <term>a,b,c...</term>
19         <listitem>
20           <para>variables of any type and size, but not protected</para>
21         </listitem>
22       </varlistentry>
23     </variablelist>
24   </refsection>
25   <refsection>
26     <title>Description</title>
27     <para>
28       This command kills variables which are not protected.
29       It removes the named variables from the environment.
30       By itself <literal>clear</literal> kills all the variables except the variables
31       protected by <literal>predef</literal>. Thus the two commands <literal>predef(0)</literal> and <literal>clear</literal>
32       remove all the variables.
33     </para>
34     <para>
35       Normally, protected variables are standard libraries and variables with
36       the percent prefix.
37     </para>
38     <para>
39       Note the particular syntax <literal>clear a</literal> and <literal>clear('a')</literal>  
40       and not <literal>clear(a)</literal>. Note also that <literal>a=[]</literal> does not kill 
41       <literal>a</literal> but sets <literal>a</literal> to an empty matrix.
42     </para>
43     <para>
44       The command <literal>clear</literal> can kill nonexistent variables, i. e. 
45       <literal>clear</literal> kills nonexistent variables as if they exist.
46     </para>
47   </refsection>
48   <refsection role="see also">
49     <title>See Also</title>
50     <simplelist type="inline">
51       <member>
52         <link linkend="predef">predef</link>
53       </member>
54       <member>
55         <link linkend="who">who</link>
56       </member>
57     </simplelist>
58   </refsection>
59 </refentry>