help: scilab|scilex page fixed & improved
[scilab.git] / scilab / modules / core / help / pt_BR / scilab.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"
3         xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
4         xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
5         xmlns:scilab="http://www.scilab.org" xml:id="scilab" xml:lang="pt">
6     <refnamediv xml:id="wscilex">
7     </refnamediv>
8     <refnamediv xml:id="scilex">
9     </refnamediv>
10     <refnamediv>
11         <refname>scilex | scilab</refname>
12         <refpurpose>principal script para executar o Scilab e ferramentas de miscelânea
13         </refpurpose>
14     </refnamediv>
15     <refsynopsisdiv>
16         <title>Sqeüência de Chamamento</title>
17         <synopsis>
18 #      MS Windows          |  # Linux / Unix / Mac OS X
19 wscilex     &lt;Options&gt;     |  scilab         &lt;Options&gt;
20 wscilex -nw &lt;Options&gt; |  scilab-adv-cli &lt;Options&gt;
21 scilex      &lt;Options&gt;      |  scilab-cli     &lt;Options&gt;
22         </synopsis>
23     </refsynopsisdiv>
24     <refsection role="arguments">
25         <title>Parâmetros</title>
26         <variablelist>
27             <varlistentry>
28                 <term>-args arg#1 arg#2 ..</term>
29                 <listitem>
30                     <para>
31                         This option allows to send some data to the Scilab session:
32                         <itemizedlist>
33                             <listitem>Consecutive data are separated by one or several spaces.
34                             </listitem>
35                             <listitem>An expression between double-quotes is a single data.
36                             </listitem>
37                             <listitem>To include a double-quote in a data, write <literal>\"</literal> instead of <literal>"</literal>.
38                             </listitem>
39                             <listitem>The single quote <literal>'</literal> is a regular character. It has no special meaning.
40                             </listitem>
41                         </itemizedlist>
42                     </para>
43                     <para>
44                       Inside the opened session, these data can be retrieved as separated strings with <link linkend="sciargs">sciargs()</link>.
45                      </para>
46                      <para>
47                       Example:
48                         <screen><![CDATA[C:\Users\Me> scilex -nb -args "Hello \"%USERNAME%\"" 1.2345 \"%cd%\"]]></screen>
49                         <programlisting><![CDATA[
50 // Inside the opened session:
51 a = sciargs()
52 i = find(a=="-args")
53 a(i+1)
54 evstr(a(i+2))*2
55 "This session has been launched from " + a(i+3)
56                         ]]>
57                         </programlisting>
58                         <screen><![CDATA[
59 --> // Inside the opened session:
60 --> a = sciargs()
61  a  =
62 !c:\SCIdir\bin\scilex  -nw  -nb  -noatomsautoload  -args  Hello "John"  1.2345  "C:\Users\Me" !
63
64 --> i = find(a=="-args")
65  i  =
66     5.
67
68 --> a(i+1)
69  ans  =
70  Hello "John"
71
72 --> evstr(a(i+2))*2
73  ans  =
74     2.469
75
76 --> "This session has been launched from " + a(i+3)
77  ans  =
78  This session has been launched from "C:\Users\Me"
79
80 -->
81 ]]></screen>
82                      </para>
83                      <para>
84                      <note>Using <literal>-args</literal> as the <emphasis role="italic">last</emphasis> command line option is safer.
85                      </note>
86                      </para>
87                 </listitem>
88             </varlistentry>
89             <varlistentry>
90                 <term>-display Display</term>
91                 <listitem>
92                     <para>Para uso apenas em sistemas Xwindow para ajustar um display de
93                         servidor X. O display padrão é unix:0.0
94                     </para>
95                     <para>
96                         <literal>-display</literal> pode ser abreviado por
97                         <literal>-d</literal>
98                     </para>
99                 </listitem>
100             </varlistentry>
101             <varlistentry>
102                 <term>-e Instructions</term>
103                 <listitem>
104                     <para>
105                         No final de toda a sessão de inicialização, esta opção
106                         <itemizedlist>
107                             <listitem>
108                                 <para>Define o diretório de trabalho atual para o diretório shell do qual o Scilab foi lançado. Por favor veja o exemplo dado aqui-abaixo para a opção <literal> -f </literal>. Então,
109                                 </para>
110                             </listitem>
111                             <listitem>
112                                 <para>executa dado Scilab <literal>Instructions</literal>. Exemplo :
113                                     <screen><![CDATA[ scilab-cli -e  "disp(\"Hello\"); a=%pi+%i; disp(exp(a)); exit;" -nb]]></screen>
114                                 </para>
115                             </listitem>
116                         </itemizedlist>
117                     </para>
118                     <warning>
119                         As opções <literal>-e</literal> e <literal>-f</literal> são mutuamente exclusivas.
120                     </warning>
121                 </listitem>
122             </varlistentry>
123             <varlistentry>
124                 <term>-f file</term>
125                 <listitem>
126                     <para>
127                         If this option is used, then at the beginning of the Scilab session, after the execution of the scilab and user startup files, and after the setting of user Preferences -- including the working directory ones --,
128                         <itemizedlist>
129                             <listitem>
130                                 <para>
131                                     the current Scilab working directory is set to the shell directory from which Scilab has been launched. For instance,
132                                     <screen><![CDATA[ D:\users\me\scilab\dev> C:\scilab-5.5.2\bin\scilex -f ..\test.sce]]></screen>
133                                     will do a <literal>cd("D:\users\me\scilab\dev")</literal>.
134                                 </para>
135                             </listitem>
136                             <listitem>
137                                 <para>
138                                     the Scilab script <literal>file</literal> is executed. If a relative path is used (default <literal>.\</literal>, or like <literal>..\</literal> in the sample here-above), it refers to the new Scilab working directory.
139                                 </para>
140                             </listitem>
141                         </itemizedlist>
142                     </para>
143                     <para>
144                         A file with .xcos extension will be opened by Xcos.
145                     </para>
146                 </listitem>
147             </varlistentry>
148             <varlistentry>
149                 <term>-quit</term>
150                 <listitem>
151                     <para>This option forces scilab to always exit after the instruction(s) passed with the <literal>-e</literal>
152                     option, or the script referred to by the <literal>-f</literal> option, have been executed,
153                     even in case of a runtime error. This option should always be used in batch mode.
154                     It is ignored if neither <literal>-e</literal> nor <literal>-f</literal> options are present.
155                     </para>
156                 </listitem>
157             </varlistentry>
158             <varlistentry>
159                 <term>-l idioma</term>
160                 <listitem>
161                     <para>Se esta opção estiver presente, ela fica o idioma do usuário.
162                         Os possíveis valores para <literal>idioma</literal> são
163                         <literal>'fr'</literal> para francês, <literal>'en'</literal> para
164                         inglês e 'br' para português brasileiro. O idioma padrão é inglês. O
165                         valor padrão é fixado no arquivo
166                         <literal>scilab.start</literal>.
167                     </para>
168                 </listitem>
169             </varlistentry>
170             <varlistentry>
171                 <term>-nb</term>
172                 <listitem>
173                     <para>"no banner" : Se esta opção está presente, então o cartão de boas-vindas não é impresso.
174                     </para>
175                 </listitem>
176             </varlistentry>
177             <varlistentry>
178                 <term>-ns</term>
179                 <listitem>
180                     <para>"No Startup files" : Se esta opção está presente, o arquivo de inicialização
181                         <literal>SCI/etc/scilab.start</literal> e os arquivos de
182                         inicialização do usuário <literal>SCIHOME/.scilab</literal>,
183                         <literal>SCIHOME/scilab.ini</literal> não são executados.
184                     </para>
185                 </listitem>
186             </varlistentry>
187             <varlistentry>
188                 <term>-nouserstartup</term>
189                 <listitem>
190                     <para>Se esta opção estiver presente, os arquivos de inicialização
191                         do usuário <literal>SCIHOME/.scilab</literal>,
192                         <literal>SCIHOME/scilab.ini</literal> não são executados.
193                     </para>
194                 </listitem>
195             </varlistentry>
196             <varlistentry>
197                 <term>-nw</term>
198                 <listitem>
199                     <para>Se esta opção estiver presente, então o Scilab não é executado
200                         em uma janela específica.
201                     </para>
202                 </listitem>
203             </varlistentry>
204             <varlistentry>
205                 <term>-nwni / -nogui</term>
206                 <listitem>
207                     <important>
208                         This mode prevents loading the Java Virtual Machine.
209                         It starts faster and uses less memory.
210                     </important>
211                     <para>Se esta opção estiver presente, então o Scilab não é executado
212                         em uma janela específica e não aceita interação do usuário
213                         (graphics, export, xcos, scinotes, help browser, Java module,...).
214                     </para>
215                 </listitem>
216             </varlistentry>
217             <varlistentry>
218                 <term>--texmacs</term>
219                 <listitem>
220                     <para>Esta opção é reservada para TexMacs.</para>
221                 </listitem>
222             </varlistentry>
223             <varlistentry>
224                 <term>-version</term>
225                 <listitem>
226                     <para>Esta opção imprime a versão do Scilab.</para>
227                 </listitem>
228             </varlistentry>
229         </variablelist>
230     </refsection>
231     <refsection role="arguments">
232         <title>Additional options for Unix/Linux and Mac OS X</title>
233         <para>Advice: use theses options on a Scilab source tree.</para>
234         <variablelist>
235             <varlistentry>
236                 <term>-debug</term>
237                 <listitem>
238                     <para>Inicia o Scilab no debugger gdb.</para>
239                     <para>
240                         The variable <literal>SCILAB_GDB_OPT</literal> may be set to add custom options to gdb.
241                     </para>
242                 </listitem>
243             </varlistentry>
244             <varlistentry>
245                 <term>-debug-kdbg</term>
246                 <listitem>
247                     <para>Start Scilab under kdbg.</para>
248                 </listitem>
249             </varlistentry>
250             <varlistentry>
251                 <term>-profiling</term>
252                 <listitem>
253                     <para>Start Scilab under valgrind.</para>
254                     <para>The variable SCILAB_VALGRIND_OPT may be set to add custom options
255                         to valgrind (and override the existing valgrind options).
256                     </para>
257                 </listitem>
258             </varlistentry>
259             <varlistentry>
260                 <term>-profiling-visu</term>
261                 <listitem>
262                     <para>Start Scilab under callgrind.</para>
263                     <para>The variable SCILAB_VALGRIND_OPT may be set to add custom options
264                         to callgrind (and override the existing callgrind options).
265                     </para>
266                 </listitem>
267             </varlistentry>
268             <varlistentry>
269                 <term>-electric-fence</term>
270                 <listitem>
271                     <para>Start Scilab with the Electric Fence.</para>
272                 </listitem>
273             </varlistentry>
274         </variablelist>
275     </refsection>
276     <refsection role="description">
277         <title>Environment variables</title>
278         <variablelist>
279             <varlistentry>
280                 <term>SCIVERBOSE</term>
281                 <listitem>
282                     <para>
283                         If this variable is present, Scilab startup script will show a startup debug information.
284                         Mainly used for bug report and debugging purposes.
285                     </para>
286                 </listitem>
287             </varlistentry>
288             <varlistentry>
289                 <term>JAVA_HOME</term>
290                 <listitem>
291                     <para>
292                         Specify which Java to use. For example,
293                         <literal>JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab</literal> will start Scilab with Java 7.
294                     </para>
295                 </listitem>
296             </varlistentry>
297             <varlistentry>
298                 <term>SCI_DISABLE_TK</term>
299                 <listitem>
300                     <para>Disable Tk (but not Tcl) features.</para>
301                 </listitem>
302             </varlistentry>
303             <varlistentry>
304                 <term>SCI_JAVA_ENABLE_HEADLESS</term>
305                 <listitem>
306                     <para>
307                         Enable Java Headless VM (i.e. without GUI features).
308                     </para>
309                 </listitem>
310             </varlistentry>
311         </variablelist>
312     </refsection>
313     <refsection role="description">
314         <title>Java Virtual Machine options</title>
315         <warning>
316             The options described here-below are useless and are cancelled if the option <literal>-nwni</literal> is used.
317         </warning>
318         <para>Starting from Scilab 5.0, the graphical user interface (GUI) and the
319             build documentation are based on Java features. In some cases, it can be
320             important to edit the JVM options (Java Virtual Machine).
321         </para>
322         <para>These options are available in the
323             <emphasis>jvm_options.xml</emphasis> file.
324         </para>
325         <para>In version 5.0.X and 5.1.X, this file is stored as
326             <emphasis>SCI/modules/jvm/etc/jvm_options.xml</emphasis>.
327         </para>
328         <para>In version &gt;= 5.2.0, the file is available in
329             <emphasis>etc/jvm_options.xml</emphasis>.
330         </para>
331         <para>
332             <emphasis>
333                 By default, the three following options are
334                 easily accessible in the configuration file:
335             </emphasis>
336         </para>
337         <variablelist>
338             <varlistentry>
339                 <term>-XmxXXXm</term>
340                 <listitem>
341                     <para>This option set the amount of memory available by the Java
342                         Virtual Machine. By default, 256M are allocated. If you change this
343                         value, check that the value does not exceed the memory available on
344                         the system.
345                     </para>
346                     <para>Since Scilab 5.4.0, this value can be changed in the preferences menu.</para>
347                 </listitem>
348             </varlistentry>
349             <varlistentry>
350                 <term>-Djava.compiler=JIT</term>
351                 <listitem>
352                     <para>
353                         This option with the argument <emphasis>JIT</emphasis> enables
354                         the Java Just In Time compiler. It is activated by default.
355                         <emphasis>NONE</emphasis> disables the JIT and decreases
356                         dramatically performances.
357                     </para>
358                 </listitem>
359             </varlistentry>
360             <varlistentry>
361                 <term>-verbose:jni / -Xcheck:jni</term>
362                 <listitem>
363                     <para>These options enable more checks and output from the JNI
364                         calls. These options are useful in case of debugging and are
365                         disabled by default since they decreases performances.
366                     </para>
367                 </listitem>
368             </varlistentry>
369         </variablelist>
370         <para>Many more options are available. They can improve the performances,
371             change look and feel, change memory managements... See: <ulink url="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</ulink>.
372         </para>
373     </refsection>
374     <refsection role="examples">
375         <title>Exemplos</title>
376         <screen><![CDATA[
377 # Let's start Scilab in profiling mode without attaching a gdb once a SIGSEGV is met.
378 # We are under Bash shell
379 export SCILAB_VALGRIND_OPT="--db-attach=no --log-file=myfile.txt"
380 scilab -profiling
381
382 # Let's start Scilab in debug mode without stopping after each SIGSEGV
383 # First, we write a small command file
384 echo "handle SIGSEGV nostop" &> debug.txt
385 # Now set the custom option
386 # We are under Bash shell
387 export SCILAB_GDB_OPT="--command=debug.txt"
388 # Start Scilab in debug mode
389 scilab -debug ]]></screen>
390         <para></para>
391         <screen><![CDATA[
392 # Under GNU/Linux, Mac OS X or Unix:
393 $ echo "disp(%pi)"|scilab-cli
394 or
395 $ echo "disp(%pi)"|scilab -nwni
396
397 # Only open the Scilab help window:
398 $ scilab-adv-cli -e "help()"
399 or
400 $ scilab -nw -e "help()"
401
402
403 # Scilab can be used for scripting aspects:
404 echo "if 1<>2 then exit(99) end"|scilab-cli
405 echo $? ]]></screen>
406     </refsection>
407     <refsection role="see also">
408         <title>Ver também</title>
409         <simplelist type="inline">
410             <member>
411                 <link linkend="startup">startup</link>
412             </member>
413             <member>
414                 <link linkend="sciargs">sciargs</link>
415             </member>
416             <member>
417                 <link linkend="getpid">getpid</link>
418             </member>
419             <member>
420                 <link linkend="getenv">getenv</link>
421             </member>
422             <member>
423                 <link linkend="getenv">getversion</link>
424             </member>
425             <member>
426                 <link linkend="consolebox">consolebox</link>
427             </member>
428             <member>
429                 <link linkend="exit">exit</link>
430             </member>
431         </simplelist>
432     </refsection>
433     <refsection role="history">
434         <title>Histórico</title>
435         <revhistory>
436             <revision>
437                 <revnumber>5.4.0</revnumber>
438                 <revremark>-noatomsautoload added.</revremark>
439             </revision>
440             <revision>
441                 <revnumber>5.4.1</revnumber>
442                 <revremark>scinotes and xcos individual scripts introduced. See SEP #87.</revremark>
443             </revision>
444             <revision>
445                 <revnumber>6.0.0</revnumber>
446                 <revremark>
447                     <literal>-quit</literal> option added. <literal>-mem</literal> option removed.
448                 </revremark>
449             </revision>
450         </revhistory>
451     </refsection>
452 </refentry>