D.3 Implicit Concatenation and Operational Syntax

Implicit concatenation and operational syntax are two deprecated features still supported by mailfromd version 6.0. These features will disappear in the next release, so you are advised to update your scripts if they still use them. See section upgrade your scripts, for a description of the upgrade procedure.

Implicit concatenation is performed wherever the compiler encounters two adjacent variables or adjacent variable and literal. Notice, that it does not affect implicit concatenation of adjacent literals, which is supported as before. That is, the following is correct:

  echo "GNU's" " not " " UNIX"

whereas the following is deprecated:

  echo %y %z

When compiler encounters such a construct, it acts as if there were a ‘.’ (dot) operator between the variables (see section Concatenation), and issues the following warning:

file:line: implicit concatenation is deprecated
file:line: use `.' operator

Operational syntax consists in calling a function of one argument without parentheses around the actual parameter, e.g.:

  set x primitive_hostname $client_addr

instead of:

  set x primitive_hostname($client_addr)

If such usage is encountered, the compiler issues the following warning:

file:line: use of function name as a prefix operator is

Both features brought more trouble than advantage, and therefore I decided to remove them. Please, update your scripts, if you are still using them. For the sake of completeness, here is what the documentation for previous versions of mailfromd said on the subject:

There are some features of MFL which, when used improperly, may lead to subtle, hard identifiable errors. These are: concatenation operation (see section Concatenation) and passing arguments to one-argument functions without parentheses (see section Operational Notation).

Since there is no explicit operator for concatenation, it is often necessary to ensure that it happens at the right time by using parentheses to enclose the items to concatenate. Consider the following example:

echo toupper "some" "thing"

Should it print ‘SOMETHING’ or just ‘SOMEthing’? The correct answer is the former, but it is difficult to deduce unless you are well acquainted with the MFL precedence rules (see section Operator Precedence). Therefore, the rule of thumb is: whenever in doubt, parenthesize:

echo toupper("some" "thing") ⇒ "SOMETHING"
echo toupper("some") "thing" ⇒ "SOMEthing"