define terminal {box $1 ht 0.3 rad 0.2}
+define bigterminal {box $1 ht 0.6 wid 1.8 rad 0.3}
define diamond {[
FRAME: box invis "$1" $2 $3 $4
circle rad 0.2 with .c at FRAME.c
]}
+
+
# It would be nice to make this work inside [], but pic refuses
define annotate {$2 at $1.end + (-0.1,0.1)}
<!ENTITY newton2 SYSTEM "../madhouse/newton2.mad">
<!ENTITY quadratic SYSTEM "../madhouse/quadratic.mad">
<!ENTITY truthtable SYSTEM "../madhouse/truthtable.mad">
+<!ENTITY simpsfunc SYSTEM "../madhouse/simpsfunc.mad">
+<!ENTITY simpsmain SYSTEM "../madhouse/simpsmain.mad">
<!ENTITY scope1 SYSTEM "scope1.xml">
<!ENTITY scope2 SYSTEM "scope2.xml">
<!ENTITY scope3 SYSTEM "scope3.xml">
</imageobject>
</mediaobject>
+<para><emphasis>The Program:</emphasis></para>
+
+<programlisting>
+&simpsfunc;
+</programlisting>
+
+<para>If, for some reason, the integral of sin 3x - cos(rx + 1) were
+needed if 0 ≤ x ≤ 3, and the integral of sin 3x - cos(rx)
+otherwise, the program might then be as follows:</para>
+
+<para><emphasis>The Program:</emphasis></para>
+
+<programlisting>
+&simpsmain;
+</programlisting>
+
+<para><emphasis>External Functions:</emphasis></para>
+<programlisting>
+&simpsfunc;
+*DATA
+ 0 2. 10 10.
+</programlisting>
+
+<para>An alternate way tio write the first eight lines of this
+program, illustrating one use of the FUNCTION NAME mode, would
+be:</para>
+
+<programlisting>
+READ READ FORMAT INPUTS,A,B,N,R
+ INTEGER N
+ WHENEVER 0. .LE. R .AND. R .LE. 3
+ S = F1.
+ OTHERWISE
+ S = F2.
+ END OF CONDITIONAL
+ PRINT FORMAT RESULT,A,B,N,R,SIMPS.(A,B,N,S)
+ TRANSFER TO READ
+ FUNCTION NAME S
+</programlisting>
</sect2>
</sect1>