* Bug 16614 fixed: replot() could fail out of gcf()
[scilab.git] / scilab / modules / functions / help / pt_BR / deff.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) XXXX-2008 - INRIA
5  * Copyright (C) 2018 - Samuel GOUGEON
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
18         xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
19         xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
20         xmlns:scilab="http://www.scilab.org" xml:id="deff" xml:lang="pt">
21     <refnamediv>
22         <refname>deff</refname>
23         <refpurpose>definição on-line de função</refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>Seqüência de Chamamento</title>
27         <synopsis>deff('[s1, s2, ...] = newfunction(e1, e2,...)',text)</synopsis>
28     </refsynopsisdiv>
29     <refsection>
30         <title>Parâmetros</title>
31         <variablelist>
32             <varlistentry>
33                 <term>e1, e2, ...</term>
34                 <listitem>
35                     <para>variáveis de entrada.</para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>s1, s2, ...</term>
40                 <listitem>
41                     <para>variáveis de saída.</para>
42                 </listitem>
43             </varlistentry>
44             <varlistentry>
45                 <term>text</term>
46                 <listitem>
47                     <para>matriz de strings.</para>
48                 </listitem>
49             </varlistentry>
50         </variablelist>
51     </refsection>
52     <refsection>
53         <title>Descrição</title>
54         <para>
55             <function>deff</function> pode ser usada para definir funções de
56             seqüências de instruções escritas em strings de textos. Objeto função
57             resultante tem as mesmas propriedades que qualquer outra função definida
58             em um arquivo de texto e carregada através de <function>exec</function> ou
59             <function>exec</function>.
60         </para>
61     </refsection>
62     <refsection>
63         <title>Exemplos</title>
64         <programlisting role="example"><![CDATA[
65 deff('x = myplus(y,z)', 'x = y+z')
66 myplus(1,%i)
67
68 deff('[y, z] = mymacro(x)', ['y = 3*x+1'; 'z = a*x + x.^2'])
69 a = 3;
70 [u, v] = mymacro(2)
71  ]]></programlisting>
72     <screen><![CDATA[
73 --> deff('x = myplus(y,z)', 'x = y+z')
74 --> myplus(1,%i)
75  ans  =
76    1. + i
77
78 --> deff('[y, z] = mymacro(x)', ['y = 3*x+1'; 'z = a*x + x.^2'])
79 --> a = 3;
80 --> [u, v] = mymacro(2)
81  v  =
82    10.
83
84  u  =
85    7.
86 ]]></screen>
87     </refsection>
88     <refsection role="see also">
89         <title>Ver Também</title>
90         <simplelist type="inline">
91             <member>
92                 <link linkend="function">function</link>
93             </member>
94             <member>
95                 <link linkend="exec">exec</link>
96             </member>
97             <member>
98                 <link linkend="getd">getd</link>
99             </member>
100             <member>
101                 <link linkend="genlib">genlib</link>
102             </member>
103             <member>
104                 <link linkend="jdeff">jdeff</link>
105             </member>
106             <member>
107                 <link linkend="jcompile">jcompile</link>
108             </member>
109         </simplelist>
110     </refsection>
111     <refsection role="history">
112         <title>Histórico</title>
113         <revhistory>
114             <revision>
115                 <revnumber>6.0.0</revnumber>
116                 <revdescription>
117                    <itemizedlist>
118                      <listitem>
119                        The input option
120                        <ulink url="https://help.scilab.org/docs/5.5.2/pt_BR/deff.html">
121                          <varname>opt="c"|"p"|"n"</varname>
122                        </ulink> is no longer available.
123                      </listitem>
124                      <listitem>
125                         The defined <varname>newfunction</varname> is now of type 13 (instead of 11).
126                      </listitem>
127                   </itemizedlist>
128                 </revdescription>
129             </revision>
130         </revhistory>
131     </refsection>
132 </refentry>