File: minsert.html

package info (click to toggle)
sdf 2.001%2B1-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,140 kB
  • sloc: perl: 18,543; sh: 31; makefile: 29
file content (106 lines) | stat: -rw-r--r-- 2,620 bytes parent folder | download | duplicates (6)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!doctype html public "-//W30//DTD W3 HTML 2.0//EN">

<HTML>

<!-- This file was generated using SDF 2.001 by
     Ian Clatworthy (ianc@mincom.com). SDF is freely
     available from http://www.mincom.com/mtr/sdf. -->

<HEAD>
<TITLE>SDF 2.001: SDF Reference: insert Macro</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">

<DIV CLASS="header">
<P><IMG SRC="../sdflogo.gif" ALIGN="Right"></P>
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="re_sdf.html">Contents</A> | <A HREF="in_mac.html">Parent Topic</A> | <A HREF="minit.html">Previous Topic</A> | <A HREF="mjumps.html">Next Topic</A> <BR><A HREF="../index.html">Home</A> | <A HREF="../catalog.html">Catalog</A></P>
</DIV>
<BR CLEAR="Right">
</DIV>
<DIV CLASS="main">
<H1>6.27. insert Macro</H1>
<HR>
<H2><A NAME="Interface">Interface</A></H2>
<P>The general syntax is:</P>
<PRE>
  !<STRONG>insert</STRONG> macro [; missing]
</PRE>
<P>The arguments are:</P>
<TABLE CLASS="columns" BORDER>
<TR CLASS="heading">
<TD>
<STRONG>Name</STRONG>
</TD>
<TD>
<STRONG>Type</STRONG>
</TD>
<TD>
<STRONG>Default</STRONG>
</TD>
<TD>
<STRONG>Rule</STRONG>
</TD>
</TR>
<TR>
<TD>
macro
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
missing
</TD>
<TD>
string
</TD>
<TD>
ok
</TD>
<TD>
&lt;ok|error|warning&gt;
</TD>
</TR>
</TABLE>

<P>See <A HREF="in_macif.html">Understanding Macro Interfaces</A>, if necessary.</P>
<HR>
<H2><A NAME="Description">Description</A></H2>
<P>The <EM>insert</EM> macro is used to insert the output of <EM>macro</EM> into an SDF document. <EM>missing</EM> determines the action if the macro isn't found:</P>
<UL>
<LI><EM>ok</EM> - do nothing
<LI><EM>warning</EM> - report a warning
<LI><EM>error</EM> - report an error.</UL>
<P><HR WIDTH="80%" ALIGN="Left">
<STRONG>Note: </STRONG>In early versions of SDF, this macro was used to call user-defined macros. In SDF 2.000 or later, user-defined macros can be called using the same syntax as built-in macros.
<HR WIDTH="80%" ALIGN="Left"></P>
<HR>
<H2><A NAME="Examples">Examples</A></H2>
<PRE>
<I># Insert the text of macro XXX if it's defined</I>
<B>!insert</B> <TT>'XXX'</TT>

<I># Insert the text of macro XXX; output an error if it's not defined</I>
<B>!insert</B> <TT>'XXX'</TT>; <TT>'error'</TT>

<I># Same as the previous example</I>
!XXX
</PRE>
</DIV>
<DIV CLASS="footer">
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="re_sdf.html">Contents</A> | <A HREF="in_mac.html">Parent Topic</A> | <A HREF="minit.html">Previous Topic</A> | <A HREF="mjumps.html">Next Topic</A> <BR><A HREF="../index.html">Home</A> | <A HREF="../catalog.html">Catalog</A></P>
</DIV>
</DIV>

</BODY>
</HTML>