[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The arguments are evaluated and converted to a string, if necessary. A
simple name will be interpreted as an AutoGen value name and its value will
be used by the SELECT
macros (see the example below and the
expression evaluation function, see section EXPR - Evaluate and emit an Expression). The scope of the macro is
up to the matching ESAC
macro. Within the scope of a CASE
,
this string is matched against case selection macros. There are sixteen
match macros that are derived from four different ways matches may be
performed, plus an "always true", "true if the AutoGen value was found",
and "true if no AutoGen value was found" matches. The codes for the
nineteen match macros are formed as follows:
*
).
*
).
=
).
If a pattern match, use a tilde (~
).
*
).
!E
) before
testing a full match against an empty string (== ''
).
There is also an existence test (+E
), more for symmetry than
for practical use.
For example:
[+ CASE <full-expression> +] [+ ~~* "[Tt]est" +]reg exp must match at start, not at end [+ == "TeSt" +]a full-string, case sensitive compare [+ = "TEST" +]a full-string, case insensitive compare [+ !E +]not exists - matches if no AutoGen value found [+ == "" +]expression yielded a zero-length string [+ +E +]exists - matches if there is any value result [+ * +]always match - no testing [+ ESAC +] |
<full-expression>
(see section Macro Expression Syntax) may be any expression,
including the use of apply-codes and value-names. If the expression yields
a number, it is converted to a decimal string.
These case selection codes have also been implemented as Scheme expression functions using the same codes. They are documented in this texi doc as "string-*?" predicates (see section Common Scheme Functions).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Bruce Korb on September, 30 2006 using texi2html 1.76.