.WARN - print an error message to the user.

Usage:

B:
   ret = .warn( format [, arg1, arg2, ... ] );
C:
   #include <sdgstd.h>
   int _warn(const char *format,...);

Description:

The "format" string and other arguments are passed to PRINTF to create an error message. In TSS, this message is typed on the terminal. In batch, the message is written to file code P* and to the execution report.

The result of .WARN is the value returned by PRINTF; this is the number of characters output.

.WARN is frequently used when some complex error message is going to be printed out in several steps. The first steps can be calls to .WARN and the last step is a call to ERROR or .ABORT to finish the message and terminate the program.

Before printing its warning message, .WARN clears any error condition on unit -4 (P* in batch, the terminal in TSS). It does this in an effort to ensure that its message actually appears. If .WARN receives an error while printing the warning message, it calls .ABORT to display the same message and abort the program.

See Also:

expl b lib .abort

expl b lib error

expl b lib printf

expl b lib ty.err

expl c lib _warn

Copyright © 1996, Thinkage Ltd.