length(): documents changes for cells and structures arrays
[scilab.git] / scilab / modules / string / help / pt_BR / length.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) INRIA -
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="length" xml:lang="pt">
17     <refnamediv>
18         <refname>length</refname>
19         <refpurpose>comprimento de um objeto</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Seqüência de Chamamento</title>
23         <synopsis>n=length(M)</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Parâmetros</title>
27         <variablelist>
28             <varlistentry>
29                 <term>M</term>
30                 <listitem>
31                     <para>matriz (usual ou de polinômios ou de strings) ou lista</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>n</term>
36                 <listitem>
37                     <para>inteiro ou matriz de inteiros</para>
38                 </listitem>
39             </varlistentry>
40         </variablelist>
41     </refsection>
42     <refsection>
43         <title>Descrição</title>
44         <para>
45             Para uma matriz usual ou de polinômios, <literal>n</literal> é o
46             inteiro igual ao número de linhas vezes o número de colunas de
47             <literal>M</literal>. (Também válido para <literal>M</literal> uma matriz
48             de booleanos)
49         </para>
50         <para>Para matrizes de strings (e, em particular, para um string)
51             <literal>length</literal> retorna em <literal>n</literal> os comprimentos
52             das entradas da matriz de strings <literal>M</literal>.
53         </para>
54         <para>O comprimento de uma lista é o número de elementos da lista (também
55             dado por <literal>size</literal>).
56         </para>
57         <para>
58             The length of an array M of cells or of structures is the number of elements of the array.
59             It is equivalent to <literal>size(M, "*")</literal>.
60         </para>
61         <para>
62             <literal>length('123')</literal> é <literal>3</literal>.
63             <literal>length([1,2;3,4])</literal> is <literal>4</literal>.
64         </para>
65         <para>AVISO : length para matrizes esparsas retorna o máximo das
66             dimensões, não o produto das dimensões. (exemplo :
67             length(sparse(eye(12,2))) retorna max(12,2), não 24)
68         </para>
69         <para>Utilize size(...,'*') para matrizes esparsas.</para>
70     </refsection>
71     <refsection>
72         <title>Exemplos</title>
73         <programlisting role="example"><![CDATA[
74 length([123 ; 456 ])
75 length(['olá mundo',SCI])
76  ]]></programlisting>
77     </refsection>
78     <refsection>
79         <title>Ver Também</title>
80         <simplelist type="inline">
81             <member>
82                 <link linkend="size">size</link>
83             </member>
84         </simplelist>
85     </refsection>
86     <refsection>
87         <title>History</title>
88         <revhistory>
89             <revision>
90                 <revnumber>5.4.0</revnumber>
91                 <revremark>
92                     This function allows overloading for mlist type.
93                 </revremark>
94             </revision>
95             <revision>
96                 <revnumber>6.0.0</revnumber>
97                 <revremark>
98                     <itemizedlist>
99                         <listitem>
100                             The <literal>length()</literal> of any array C of cells was formerly
101                             always 3, whatever are the number of dimensions and the sizes of the
102                             array. It is now the number of elements of the array at null depth
103                             (without recursive counting), equal to <literal>size(C, "*")</literal>.
104                         </listitem>
105                         <listitem>
106                             The <literal>length()</literal> of any array S of structures was formerly
107                             equal to its number of fields +2, whatever are the number of dimensions
108                             and the sizes of the array. It is now the number of elements of the
109                             array at null depth, equal to <literal>size(S, "*")</literal>.
110                         </listitem>
111                     </itemizedlist>
112                 </revremark>
113             </revision>
114         </revhistory>
115     </refsection>
116 </refentry>