IO.ERR - output error message related to an I/O unit.
Usage:
B:
io.err( unit [, errnum [, format, arg1, arg2, ...]] );
C:
#equate io_err io.err
void io_err(FILE *unit [, int errnum,
[const char *format, ... ]] );
Where:
- unit
- is a unit number or FILE* pointer indicating a unit on
which an error occurred.
- errnum
- is an error number indicating the nature of the error. If
this is omitted, IO.ERR outputs the posted message for
the unit (if any).
- format
- is a PRINTF-style format string
giving the error message. If this is omitted, IO.ERR
outputs the posted error message for the specified unit,
provided that the error number of the posted error
message matches "errnum".
- arg1, arg2, ...
- are arguments to be filled into placeholders in the
"format" string.
Description:
IO.ERR outputs an error message to the standard error unit.
This message describes an error encountered on "unit".
The format of the message output by IO.ERR is
filename: location: message
where "filename" is the name of the associated with
"unit", "location" is the current read/write
location on the unit, and "message" is the text of the
error message.
You may specify the text of the error message in the call to
IO.ERR by specifying a format string and arguments. If you do not
specify such a message, IO.ERR generates its own, using the
following rules:
- If you do not specify an "errnum" and the unit
is in an error state, IO.ERR prints the posted error
message.
- If you do not specify an "errnum" and the unit
has no posted error message, IO.ERR does not output a
message.
- If you specify an "errnum", IO.ERR sets the
unit into an error state. IO.ERR prints out an error
message if the options specified when the unit was opened
request such a message.
For more on posted error messages, see "expl b lib .epost".
See Also:
expl b lib io.perr
Copyright © 1996, Thinkage Ltd.