[doc] misc. fix & improvements
[scilab.git] / scilab / modules / core / help / pt_BR / debugging / where.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:ns4="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="where" xml:lang="pt">
6     <refnamediv>
7         <refname>where</refname>
8         <refpurpose>retorna a árvore de chamamento de instruções
9             corrente
10         </refpurpose>
11     </refnamediv>
12     <refsynopsisdiv>
13         <title> Seqüência de Chamamento </title>
14         <synopsis>[linenum,mac]=where()</synopsis>
15     </refsynopsisdiv>
16     <refsection>
17         <title>Parâmetros</title>
18         <variablelist>
19             <varlistentry>
20                 <term>linenum</term>
21                 <listitem>
22                     <para>vetor coluna de inteiros </para>
23                 </listitem>
24             </varlistentry>
25             <varlistentry>
26                 <term>mac</term>
27                 <listitem>
28                     <para>vetor coluna de strings</para>
29                 </listitem>
30             </varlistentry>
31         </variablelist>
32     </refsection>
33     <refsection>
34         <title>Descrição</title>
35         <para>
36             Retorna <literal>linenum</literal> e <literal>mac</literal> tais que
37             a instrução corrente foi chamada pela linha <literal>linenum(1)</literal> da função <literal>mac(1)</literal>,
38             <literal>mac(1)</literal> foi chamada pela linha <literal>linenum(2)</literal> da função <literal>mac(2)</literal>, e assim por
39             diante.
40         </para>
41         <para>
42             <literal>mac(i)</literal> é, em geral o nome de uma função, mas também pode ser <literal>"exec"</literal>
43             ou <literal>"execstr"</literal> se a instrução reside em um arquivo executável ou em uma
44             instrução execstr.
45         </para>
46     </refsection>
47     <refsection>
48         <title>Exemplo</title>
49         <programlisting role="example"><![CDATA[
50 function foo()
51     c = 1
52     [a,b] = where()
53     disp("Line:")
54     disp(a);
55     disp("Function:")
56     disp(b);
57 endfunction
58
59 function test()
60     function beer()
61         foo()
62     endfunction
63     beer()
64 endfunction
65
66 test()
67  ]]></programlisting>
68     <screen><![CDATA[
69 --> test()
70  Line:
71    3.
72    2.
73    5.
74
75  Function:
76 !foo   !
77 !beer  !
78 !test  !
79 ]]></screen>
80     </refsection>
81     <refsection>
82         <title> Ver Também </title>
83         <simplelist type="inline">
84             <member>
85                 <link linkend="whereami">whereami</link>
86             </member>
87             <member>
88                 <link linkend="recursionlimit">recursionlimit</link>
89             </member>
90             <member>
91                 <link linkend="pause">pause</link>
92             </member>
93         </simplelist>
94     </refsection>
95 </refentry>