| 
 Whole document tree ProgramListingCONameProgramListingCO -- Listing of a program or related information containing areas with associated calloutsDescriptionListing of a program or related information that contains a specification of areas within it that have associated callout descriptions, and may also contain the descriptions themselves. ProgramListingCO has common attributes. ParentsThese elements contain ProgramListingCO: Appendix, Article, BiblioDiv, Bibliography, BlockQuote, Callout, Caution, Chapter, Dedication, Example, Figure, Footnote, GlossDef, GlossDiv, Glossary, Important, Index, IndexDiv, InformalExample, LegalNotice, ListItem, MsgExplan, MsgText, Note, Para, PartIntro, Preface, Procedure, RefSect1, RefSect2, RefSect3, RefSynopsisDiv, Sect1, Sect2, Sect3, Sect4, Sect5, SetIndex, Sidebar, SimpleSect, Step, Tip, Warning, entry. ChildrenProgramListingCO contains these elements: AreaSpec, CalloutList, ProgramListing. In some contexts, additional elements may be allowed by inclusions in parent elements. Similarly, in some contexts, some of these elements may be invalid due to exclusions in parent elements. Examples<PROGRAMLISTINGCO> <AREASPEC UNITS="LINECOLUMN"> <AREA ID="sco123" COORDS="1 1"> <AREA ID="sco124" COORDS="6 9"> </AREASPEC> <PROGRAMLISTING> <SYSTEMITEM CLASS="PROMPT">%</SYSTEMITEM> <USERINPUT>make install</USERINPUT> install -c -m 0644 rgb.txt /usr/lib/X11 install -c -m 0644 rgb.dir /usr/lib/X11 install -c -m 0644 rgb.pag /usr/lib/X11 install -c -s showrgb /usr/lib/X11 install in ./rgb done </PROGRAMLISTING> <CALLOUTLIST> <TITLE>Comments on the Screen Shown Above</TITLE> <CALLOUT AREAREFS="sco123"> <PARA>Note % prompt.</PARA> </CALLOUT> <CALLOUT AREAREFS="sco124"> <PARA>Note use of install without flag. </PARA> </CALLOUT> </CALLOUTLIST> </PROGRAMLISTINGCO> <programlistingco>
<areaspec>
<area id="ex.plco.ret" coords=12>
<area id="ex.plco.dest" coords=12>
<areaset id="ex.plco.const" coords="">
  <area id="ex.plco.c1" coords=4>
  <area id="ex.plco.c2" coords=8>
</areaset>
</areaspec>
<programlisting>
sub do_nothing_useful {
    my($a, $b, $c);
    $a = new A;
    
    $a->does_nothing_either();
    $b = new B; 
    $c = "frog";
    return ($a, $c);
}
</programlisting>
<calloutlist>
<callout arearefs="ex.plco.const">
<para>
These are calls to the constructor <function>new</function> 
in the object classes.
</para>
</callout>
<callout arearefs="ex.plco.ret">
<para>
This function returns a two-element list.
</para>
</callout>
<callout arearefs="ex.plco.dest">
<note>
<para>
The <emphasis>destructor</emphasis> (<function>DESTROY</function>) 
for the object <literal>$b</literal> will be called automatically for 
this object as there can be no other references to it outside 
this function.
</para>
</note>
</callout>
</calloutlist>
</programlistingco> |