<chapter><title>Callout Tests</title>

<bridgehead renderas=sect4>CallOut (using AREASPEC)</bridgehead>

<programlistingco>
<areaspec>
<area id=prologue coords="1">
<area id=skipeof coords="4">
<areaset id=xreq coords="">
  <area id=require1 coords="9">
  <area id=require2 coords="10">
</areaset>
<area id=use coords="11 12">
<area id=funccall coords="27">
</areaspec>
<programlisting>
@rem = '--*-Perl-*--
@echo off
perl.exe %_batchname %$
goto endofperl
@rem ';

# Compress mail...

require 'n:/home/nwalsh/lib/cygnus.pl';
require 'timelocal.pl';
use Cwd;

select (STDERR); $| = 1;
select (STDOUT); $| = 1;

@DIRS = ("/home/nwalsh/Mail");
while (@DIRS) {
    $dir = shift @DIRS;
    opendir (DIR, $dir);
    while ($fname = readdir(DIR)) {
        $file = "$dir/$fname";
        next if ! -d $file;
        next if $fname =~ /^\.\.?$/;

        print "$file\n";
        push (@DIRS, $file);
        &amp;compress ($file);
    }
}

exit;
</programlisting>
<calloutlist>
<callout arearefs=prologue>
<para>
The prologue handles embedding a Perl script in a DOS batch file.
</para>
</callout>
<callout arearefs=skipeof>
<para>
The <literal>goto</literal> statement, interpreted by the DOS batch
file interpreter, skips over the body of the Perl script.
</para>
</callout>
<callout arearefs=require1>
<para>
The <literal>require</literal> statement sources in external program
fragments.
</para>
</callout>
<callout arearefs=use>
<para>
The <literal>use</literal> statement is similar, but has additional
utility.  It is a Perl5 function.  (Note that this callout area specifies
both a line and a column.)
</para>
</callout>
<callout arearefs=funccall>
<para>
This is a user subroutine call.
</para>
</callout>
</calloutlist>
</programlistingco>

<bridgehead renderas=sect4>CallOut (using CO)</bridgehead>

<programlisting>this is a line
this is another line
there's a <co id=callout1>callout in here.
and there's another on the
next line
right here:<co id=callout2>
</programlisting>

<calloutlist>
<callout arearefs="callout1">
<para>First callout.</para>
<para>Second para in first callout.</para>
</callout>
<callout arearefs="callout2">
<para>
Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
Blah blah blah blah. Blah blah blah blah. Blah blah blah blah.
</para>
<para>Second callout.</para>
<para>Third para in second callout.</para>
</callout>
<callout arearefs="callout1 callout2">
<para>
This paragraph describes <emphasis>both</emphasis> callouts.
</para>
</callout>
</calloutlist>

</chapter>

