~c
(tilde, followed by some character) is
found, the format derivatives will first check whether the user has
defined a predicate to handle the format. If not, the built in
formatting rules described above are used. Char is either an
ASCII value, or a one character atom, specifying the letter to be
(re)defined. Head is a term, whose name and arity are used to
determine the predicate to call for the redefined formatting character.
The first argument to the predicate is the numeric argument of the
format command, or the atom default
if no argument is
specified. The remaining arguments are filled from the argument list.
The example below redefines ~n
to produce Arg
times return followed by linefeed (so a (Grr.) DOS machine is happy with
the output).