summaryrefslogtreecommitdiff
path: root/test/testdocs/calloutlist.001.xml
blob: 9cbc269aaabe523948a1faddeaedfbe62da5b68b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<article>
<articleinfo>
<title>Unit Test: calloutlist.001</title>
<releaseinfo role="CVS">$Id$</releaseinfo>
<author><firstname>Norman</firstname><surname>Walsh</surname>
        <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
</author>
</articleinfo>

<para>Callouts using <sgmltag>co</sgmltag>:</para>

<screen>
(let <co id="dl1"/>loopvar <co id="dl2"/>((count 1))
  <co id="dl3"/>(if (> count 10)
    <co id="dl4"/>#t
    (<co id="dl5"/>loopvar <co id="dl6"/>(+ count 1))))</screen>

<calloutlist>
<callout arearefs="dl1">
<para>This variable controls the loop. It is declared without an
initial value, immediately after the <literal>let</literal>
operand.</para>
</callout>
<callout arearefs="dl2">
<para>Any number of additional local variables can be defined after
the loop variable, just as they can in any other
<literal>let</literal> expression.</para>
</callout>
<callout arearefs="dl3">
<para>If you ever want the loop to end, you have to put some sort of a
test in it.</para>
</callout>
<callout arearefs="dl4">
<para>This is the value that will be returned.</para>
</callout>
<callout arearefs="dl5">
<para>Note that you iterate the loop by using the loop variable as if
it was a function name.</para>
</callout>
<callout arearefs="dl6">
<para>The arguments to this function are the values that
you want the local variables declared in <xref linkend="dl2"/> to have
in the next iteration.</para>
</callout>
</calloutlist>

</article>