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)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

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=0. nag_file_set_unit_error (x04aa) may also be called with iflag=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 80 characters long (including a line-printer carriage control character).
Note that if the unit number is set <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=0 or 1.
2:     nerr int64int32nag_int scalar
If iflag=0, nerr need not be set.
If iflag=1, nerr must specify the new error message unit number.

Optional Input Parameters

None.

Output Parameters

1:     nerr int64int32nag_int scalar
If iflag=0, nerr is set to the current error message unit number.
If iflag=1, nerr is unchanged.
Note that Fortran unit numbers must be positive or zero. If nerr is set <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 x04aa_example


fprintf('x04aa example results\n\n');

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

fprintf('The error message unit number is set to %2d\n', nerr);
fprintf('(Note: this has no effect in this product)\n');


x04aa example results

The error message unit number is set to  6
(Note: this has no effect in this product)

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–2015