Next: , Up: Miscellaneous


13.1 Printing error messages

You can print error messages using errprint:

— Builtin: errprint (message, ...)

Prints message and the rest of the arguments on the standard error output, separated by spaces.

The expansion of errprint is void. The macro errprint is recognized only with parameters.

     errprint(`Invalid arguments to forloop
     ')
     error-->Invalid arguments to forloop
     =>

A trailing newline is not printed automatically, so it must be supplied as part of the argument, as in the example. BSD implementations of m4 do append a trailing newline on each errprint call, while some other implementations only print the first argument.