* Bug 14585: editvar(close) replaces closeEditvar()
[scilab.git] / scilab / modules / ui_data / help / en_US / editvar.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) Jaime Urzua
5  * Copyright (C) Allan CORNET - DIGITEO - 2010
6  * Copyright (C) Sylvestre Ledru - Scilab Enterprises - 2011
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  * Copyright (C) 2019 - Samuel GOUGEON
9  *
10  * This file is hereby licensed under the terms of the GNU GPL v2.0,
11  * pursuant to article 5.3.4 of the CeCILL v.2.1.
12  * This file was originally licensed under the terms of the CeCILL v2.1,
13  * and continues to be available under such terms.
14  * For more information, see the COPYING file which you should have received
15  * along with this program.
16  *
17  -->
18 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
19           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
20           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
21           xml:lang="en" xml:id="editvar">
22     <refnamediv>
23         <refname>editvar</refname>
24         <refpurpose>Scilab variable editor</refpurpose>
25     </refnamediv>
26     <refsynopsisdiv>
27         <title>Syntax</title>
28         <synopsis>
29             editvar("close")
30             editvar(varname)
31         </synopsis>
32     </refsynopsisdiv>
33     <refsection>
34         <title>Arguments</title>
35         <variablelist>
36             <varlistentry>
37                 <term>varname</term>
38                 <listitem>
39                     <para>
40                         name (single string) of the variable name to edit. The variable must exist
41                         in the current Scilab environment. It must refer to a scalar, vector or
42                         matrix of
43                         <itemizedlist>
44                             <listitem>booleans (dense or sparse)
45                             </listitem>
46                             <listitem>encoded integers (int8, uint8, int16, uint16, int32, uint32)
47                             </listitem>
48                             <listitem>real or complex numbers (dense or sparse)
49                             </listitem>
50                             <listitem>strings
51                             </listitem>
52                         </itemizedlist>
53                     </para>
54                 </listitem>
55             </varlistentry>
56         </variablelist>
57     </refsection>
58     <refsection>
59         <title>Description</title>
60         <para>
61             <literal>editvar(varname)</literal> interactively edits the variable whose name
62             is provided by <varname>varname</varname>.
63         </para>
64         <para>
65             Several variables can be edited in the same time. <literal>editvar(varname)</literal>
66             must be called once for each of them. In the editor, a new tab is opened for each
67             edited variable.
68         </para>
69         <note>
70             <para>
71                 Predefined protected constants of supported types can't be edited:
72                 <literal>%pi</literal>, <literal>%e</literal>, <literal>%eps</literal>,
73                 <literal>%i</literal>, <literal>%inf</literal>, <literal>%nan</literal>,
74                 <literal>%f</literal>, <literal>%F</literal>, <literal>%t</literal>, <literal>%T</literal>,
75                 <literal>home</literal>, <literal>SCIHOME</literal>, <literal>SCI</literal>,
76                 <literal>WSCI</literal>, <literal>TMPDIR</literal>.
77             </para>
78         </note>
79         <para>
80             <literal>editvar("close")</literal> or <literal>editvar close</literal>
81             closes the open variables editor.
82         </para>
83         <refsect3>
84             <title>Editor's features</title>
85             <para>
86                 <literal>editvar</literal> has numerous features:
87                 <itemizedlist>
88                     <listitem>
89                         <para>
90                             Matrix visualisation
91                             <para/>
92                             <para>
93                                 <inlinemediaobject>
94                                     <imageobject>
95                                         <imagedata fileref="../images/editvar_default.png"/>
96                                     </imageobject>
97                                 </inlinemediaobject>
98                             </para>
99                             <para/>
100                         </para>
101                     </listitem>
102                     <listitem><para>
103                             Undo/redo capabilities
104                         </para>
105                     </listitem>
106                     <listitem><para>
107                             Cell editing
108                         </para>
109                     </listitem>
110                     <listitem><para>
111                             Expression evaluation. Please note that editvar will not store the
112                             expression. Only the value.
113                             <para/>
114                             <para>
115                                 <inlinemediaobject>
116                                     <imageobject>
117                                         <imagedata fileref="../images/editvar_modify.png"/>
118                                     </imageobject>
119                                 </inlinemediaobject>
120                             </para>
121                             <para/>
122                             <para/>
123                         </para>
124                     </listitem>
125                     <listitem><para>
126                             Advanced selection of elements (available with the CTRL key)
127                             <para/>
128                             <para>
129                                 <inlinemediaobject>
130                                     <imageobject>
131                                         <imagedata fileref="../images/editvar_adv_selection.png"/>
132                                     </imageobject>
133                                 </inlinemediaobject>
134                             </para>
135                             <para/>
136                         </para>
137                     </listitem>
138                     <listitem><para>
139                             Plotting
140                             <para/>
141                             <para>
142                                 <inlinemediaobject>
143                                     <imageobject>
144                                         <imagedata fileref="../images/editvar_plot.png"/>
145                                     </imageobject>
146                                 </inlinemediaobject>
147                             </para>
148                             <para/>
149                         </para>
150                     </listitem>
151                     <listitem><para>
152                             Plotting of a subset
153                             <para/>
154                             <para>
155                                 <inlinemediaobject>
156                                     <imageobject>
157                                         <imagedata fileref="../images/editvar_subplot.png"/>
158                                     </imageobject>
159                                 </inlinemediaobject>
160                             </para>
161                             <para/>
162                         </para>
163                     </listitem>
164                     <listitem><para>
165                             Variable format (short, shortE, long or longE formats)
166                             <para/>
167                             <para>
168                                 <inlinemediaobject>
169                                     <imageobject>
170                                         <imagedata fileref="../images/editvar_format.png"/>
171                                     </imageobject>
172                                 </inlinemediaobject>
173                             </para>
174                             <para/>
175                         </para>
176                     </listitem>
177                     <listitem><para>
178                             Column / lines management (insert, delete, copy and paste, ... )
179                             <para/>
180                             <para>
181                                 <inlinemediaobject>
182                                     <imageobject>
183                                         <imagedata fileref="../images/editvar_column.png"/>
184                                     </imageobject>
185                                 </inlinemediaobject>
186                             </para>
187                             <para/>
188                             <para/>
189                         </para>
190                     </listitem>
191                     <listitem><para>
192                             Full copy and paste between
193                             <ulink url="http://www.libreoffice.org/">Libreoffice</ulink>/Openoffice
194                             or Microsoft Excel and Scilab (both ways).
195                             <para/>
196                             <para>
197                                 <inlinemediaobject>
198                                     <imageobject>
199                                         <imagedata fileref="../images/editvar_libreoffice.png"/>
200                                     </imageobject>
201                                 </inlinemediaobject>
202                             </para>
203                             <para/>
204                             <para/>
205                         </para>
206                     </listitem>
207                     <listitem><para>
208                             Renaming or copy of a variable
209                             <para/>
210                             <para>
211                                 <inlinemediaobject>
212                                     <imageobject>
213                                         <imagedata fileref="../images/editvar_variable_selection.png"/>
214                                     </imageobject>
215                                 </inlinemediaobject>
216                             </para>
217                             <para/>
218                         </para>
219                     </listitem>
220                 </itemizedlist>
221             </para>
222         </refsect3>
223     </refsection>
224     <refsection>
225         <title>Examples</title>
226         <programlisting role="example"><![CDATA[
227 a = rand(10,10);
228 editvar a;
229 b = ['hello';'good bye'];
230 editvar b;
231 sp = sparse([1,2;4,5;3,10],[1,2,3])
232 editvar("sp");
233  ]]></programlisting>
234     </refsection>
235     <refsection role="see also">
236         <title>See also</title>
237         <simplelist type="inline">
238             <member>
239                 <link linkend="browsevar">browsevar</link>
240             </member>
241             <member>
242                 <link linkend="whos">whos</link>
243             </member>
244             <member>
245                 <link linkend="edit">edit</link>
246             </member>
247             <member>
248                 <link linkend="ged">ged</link>
249             </member>
250             <member>
251                 <link linkend="tree_show">tree_show</link>
252             </member>
253         </simplelist>
254     </refsection>
255     <refsection role="history">
256         <title>History</title>
257         <revhistory>
258             <revision>
259                 <revnumber>6.1.0</revnumber>
260                 <revdescription>
261                     editvar("close") added
262                 </revdescription>
263             </revision>
264         </revhistory>
265     </refsection>
266 </refentry>