The SUBST
macro is a general-purpose substitution mechanism for strings in
the input. It takes two arguments: a search string and a substitution string.
E.g., after
SUBST(VERSION)(1.00)
the yodl
program will output 1.00
for each occurence of VERSION
in
its input.
The SUBST
macro is also useful in situations where multi-character
sequeces should be converted to accent characters. E.g., a LaTeX converter
might define:
SUBST('e)(NOTRANS(\'{e}))
Each '
e
in the input would then be converted to é.
The SUBST
macro may also be useful in combination with the command line
flag -P
, as in a invocation
yodl2html -P'SUBST(VERSION)(1.00)' myfile.yo
A further useful substitution may be the following:
SUBST(_OP_)(CHAR(40)) SUBST(_CP_)(CHAR(41))
which defines an opening parenthesis (_OP_
) and a closing parenthesis
(_CP_
) as mapped to the CHAR
macro. The strings _OP_
and _CP_
might then be used in unbalanced parameter lists.
Note that:
SUBST
command, the search string, is
taken literally. Yodl does not expand it; the string must be literally
matched in the input.
NOTRANS
or NOEXPAND
where appropriate.
Please send Yodl questions and comments to yodl@icce.rug.nl.
Please send comments on these web pages to (address unknown)
Copyright (c) 1997, 1998, 1999 Karel Kubat and Jan Nieuwenhuizen.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.