General-Purpose Mail Filter
|Mailfromd Manual (split by node):||?|
For compatibility with previous versions,
supports the legacy format of function declarations:
func name (param-types) returns rettype
Here, param-types is a comma-separated list of parameter types.
The following abbreviations can be used: ‘s’ for
and ‘n’ for numeric. The same holds true for rettype as
The parameters declared this way are called positional
parameters. The function can access its actual arguments using the notation
$n, where n is the ordinal number of the
argument(26). Arguments are counted from left to
right. The first argument is
For example, here's the definition of the ‘sam’ function (see sum–example), using the legacy syntax:
func sum(n, n) returns n do return $1 + $2 done
Well, to tell you the truth, you can access named arguments using positional notation as well. But such a mixing of styles is not recommended.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.