improve the documentation of the parameters module
[scilab.git] / scilab / modules / parameters / help / en_US / set_param.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 - Yann COLLETTE <yann.collette@renault.com>
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-en.txt
11  *
12  -->
13 <refentry version="5.0-subset Scilab" xml:id="set_param" xml:lang="en"
14           xmlns="http://docbook.org/ns/docbook"
15           xmlns:xlink="http://www.w3.org/1999/xlink"
16           xmlns:svg="http://www.w3.org/2000/svg"
17           xmlns:ns3="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML"
19           xmlns:db="http://docbook.org/ns/docbook">
20   <info>
21     <pubdate>23-Aug-2007</pubdate>
22   </info>
23
24   <refnamediv>
25     <refname>set_param</refname>
26
27     <refpurpose>Set the value of a parameter in a parameter list</refpurpose>
28   </refnamediv>
29
30   <refsynopsisdiv>
31     <title>Calling Sequence</title>
32
33     <synopsis>[param_list,err] = set_param(list_name,param_name,param_value)</synopsis>
34   </refsynopsisdiv>
35
36   <refsection>
37     <title>Parameters</title>
38
39     <variablelist>
40       <varlistentry>
41         <term>list_name</term>
42
43         <listitem>
44           <para>the list of parameters. This list must have been initialize by
45           a call to init_param.</para>
46         </listitem>
47       </varlistentry>
48
49       <varlistentry>
50         <term>param_name</term>
51
52         <listitem>
53           <para>a string. The name of the parameter to be added in the list of
54           parameters.</para>
55         </listitem>
56       </varlistentry>
57
58       <varlistentry>
59         <term>param_value</term>
60
61         <listitem>
62           <para>the value to be associated to the parameter param_name.</para>
63         </listitem>
64       </varlistentry>
65
66       <varlistentry>
67         <term>param_list</term>
68
69         <listitem>
70           <para>the updated list of parameters.</para>
71         </listitem>
72       </varlistentry>
73
74       <varlistentry>
75         <term>err</term>
76
77         <listitem>
78           <para>an error flag which is set to %T if list_name is not of type
79           plist (this list hasn't been initialized by a call to
80           init_param).</para>
81         </listitem>
82       </varlistentry>
83     </variablelist>
84   </refsection>
85
86   <refsection>
87     <title>Description</title>
88         <para>This function sets the value of an already existing parameter.
89         If the parameter doesn't exist, err is set to %T. If the err output
90         parameter is not present, when an error occurs, a message is printed
91         in the console.</para>
92   </refsection>
93
94   <refsection>
95     <title>Examples</title>
96
97     <programlisting role="example">
98    mylist = init_param();
99    mylist = add_param(mylist,'minbound',[0 0 0]);
100    [mylist,err] = set_param(mylist,'minbound',[1 1 1]); disp(err);
101    [mylist,err] = set_param(mylist,'maxbound',[1 1 1]); disp(err);
102   </programlisting>
103   </refsection>
104
105   <refsection>
106     <title>See Also</title>
107
108     <simplelist type="inline">
109       <member><link linkend="init_param"> init_param </link></member>
110
111       <member><link linkend="add_param"> add_param </link></member>
112
113       <member><link linkend="get_param"> get_param </link></member>
114
115       <member><link linkend="remove_param"> remove_param </link></member>
116
117       <member><link linkend="is_param"> is_param </link></member>
118     </simplelist>
119   </refsection>
120
121   <refsection>
122     <title>Authors</title>
123
124     <variablelist>
125       <varlistentry>
126         <term>collette</term>
127
128         <listitem>
129           <para>ycollet@freesurf.fr</para>
130         </listitem>
131       </varlistentry>
132     </variablelist>
133   </refsection>
134 </refentry>