File: minsert.sdf

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 (47 lines) | stat: -rw-r--r-- 1,148 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
# $Id$
#
# >>Copyright::
# Copyright (c) 1992-1996, Ian Clatworthy (ianc@mincom.com).
# You may distribute under the terms specified in the LICENSE file.
#
# >>History::
# -----------------------------------------------------------------------
# Date      Who     Change
# 16-May-96 ianc    SDF 2.000
# -----------------------------------------------------------------------
#

H1: insert Macro

H2: Interface

!macro_interface "insert"

H2: Description

The {{insert}} macro is used to insert the output of {{macro}}
into an SDF document.
{{missing}} determines the action if the macro isn't found:

* {{ok}} - do nothing
* {{warning}} - report a warning
* {{error}} - report an error.

Note: 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.

H2: Examples

!block example; lang='sdf'
# Insert the text of macro XXX if it's defined
!insert 'XXX'

# Insert the text of macro XXX; output an error if it's not defined
!insert 'XXX'; 'error'

# Same as the previous example
!XXX
!endblock

#H2: Limitations & Future Directions