General-Purpose Mail Filter
A constant is a symbolic name for an MFL value.
Constants are defined using
[qualifier] const name expr
where name is an identifier, and expr is any valid
MFL expression evaluating immediately to a constant literal
or numeric value. Optional qualifier defines the scope of
visibility for that constant (see scope of visibility): either
After defining, any appearance of name in the program text is replaced by its value. For example:
const x 10/5 const text "X is "
defines the numeric constant ‘x’ with the value ‘5’, and the literal constant ‘text’ with the value ‘X is ’.
Constants can also be used in literals. To expand a constant within a literal string, prepend a percent sign to its name, e.g.:
echo "New %text %x" ⇒ "New X is 2"
This way of expanding constants creates an ambiguity if there happen to be a variable of the same name as the constant. See variable--constant clashes, for more information of this case and ways to handle it.
This document was generated on January 3, 2019 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.