Debian Codegraph @

ru/refpages/elements/programlistingco/example.1.txt

raw
1 <!DOCTYPE programlistingco PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
2 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
3 <programlistingco>
4 <areaspec>
5 <areaset id="ex.plco.const" coords="">
6 <area id="ex.plco.c1" coords='4'/>
7 <area id="ex.plco.c2" coords='8'/>
8 </areaset>
9 <area id="ex.plco.ret" coords='12'/>
10 <area id="ex.plco.dest" coords='12'/>
11 </areaspec>
12 <programlisting>
13 sub do_nothing_useful {
14 my($a, $b, $c);
15
16 $a = new A;
17
18 $a->does_nothing_either();
19
20 $b = new B;
21
22 $c = "frog";
23
24 return ($a, $c);
25 }
26 </programlisting>
27 <calloutlist>
28 <callout arearefs="ex.plco.const">
29 <para>
30 These are calls to the constructor <function>new</function> in the object
31 classes.
32 </para>
33 </callout>
34 <callout arearefs="ex.plco.ret">
35 <para>
36 This function returns a two-element list.
37 </para>
38 </callout>
39 <callout arearefs="ex.plco.dest">
40 <para>
41 The <emphasis>destructor</emphasis> (<function>DESTROY</function>) for
42 the object <literal>$b</literal> will be called automatically for this
43 object since there can be no other references to it outside this function.
44 </para>
45 </callout>
46 </calloutlist>
47 </programlistingco>