hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_file_set_unit_error (x04aa)

Purpose

nag_file_set_unit_error (x04aa) returns the value of the current error message unit number, or sets the current error message unit number to a new value.

Syntax

[nerr] = x04aa(iflag, nerr)
[nerr] = nag_file_set_unit_error(iflag, nerr)

Description

nag_file_set_unit_error (x04aa) enables those library functions which output error messages, to determine the number of the output unit to which the error messages are to be sent; in this case nag_file_set_unit_error (x04aa) is called with iflag = 0iflag=0. nag_file_set_unit_error (x04aa) may also be called with iflag = 1iflag=1 to set the unit number to a specified value. Otherwise a default value is returned.
Records written to this output unit by other library functions are at most 8080 characters long (including a line-printer carriage control character).
Note that if the unit number is set < 0<0, no messages will be output.

References

None.

Parameters

Compulsory Input Parameters

1:     iflag – int64int32nag_int scalar
The action to be taken (see nerr).
Constraint: iflag = 0iflag=0 or 11.
2:     nerr – int64int32nag_int scalar
If iflag = 0iflag=0, nerr need not be set.
If iflag = 1iflag=1, nerr must specify the new error message unit number.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     nerr – int64int32nag_int scalar
If iflag = 0iflag=0, nerr is set to the current error message unit number.
If iflag = 1iflag=1, nerr is unchanged.
Note that Fortran unit numbers must be positive or zero. If nerr is set < 0<0, output of error messages is totally suppressed.

Error Indicators and Warnings

None.

Accuracy

Not applicable.

Further Comments

The time taken by nag_file_set_unit_error (x04aa) is negligible.

Example

function nag_file_set_unit_error_example
iflag = int64(1);
nerr = int64(6);
[nerrOut] = nag_file_set_unit_error(iflag, nerr)
 

nerrOut =

                    6


function x04aa_example
iflag = int64(1);
nerr = int64(6);
[nerrOut] = x04aa(iflag, nerr)
 

nerrOut =

                    6



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013