NAG Library Routine Document
X04AAF returns the value of the current error message unit number, or sets the current error message unit number to a new value.
X04AAF enables those library routines which output error messages, to determine the number of the output unit to which the error messages are to be sent; in this case X04AAF is called with
. X04AAF may also be called with
to set the unit number to a specified value. Otherwise a default value (stated in the Users' Note
for your implementation) is returned.
Records written to this output unit by other library routines are at most characters long (including a line-printer carriage control character).
Note that if the unit number is set , no messages will be output.
- 1: – INTEGERInput
: the action to be taken (see NERR
- 2: – INTEGERInput/Output
need not be set.
must specify the new error message unit number.
is set to the current error message unit number.
Note that Fortran unit numbers must be positive or zero. If NERR
, output of error messages is totally suppressed. It is important to note that if you supply an illegal value for NERR
(such as a unit number associated with a file opened for reading instead of writing) then X04AAF cannot detect that fact, but any output sent to the unit by later calls of NAG routines may have undesirable consequences, such as program crashes.
6 Error Indicators and Warnings
8 Parallelism and Performance
X04AAF is not thread safe and should not be called from a multithreaded user program. Please see Section 3.12.1
in How to Use the NAG Library and its Documentation for more information on thread safety.
X04AAF is not threaded in any implementation.
The time taken by X04AAF is negligible.
In this example X04AAF is called by your main program to make the error message from the routine DUMMY appear on the same unit as the rest of the output (unit
). Normally a NAG Library routine with an IFAIL argument (see Section 3.4.2
in How to Use the NAG Library and its Documentation) would take the place of DUMMY.
10.1 Program Text
Program Text (x04aafe.f90)
10.2 Program Data
10.3 Program Results
Program Results (x04aafe.r)