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_advisory (x04ab)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_file_set_unit_advisory (x04ab) returns the value of the current advisory message unit number, or sets the current advisory message unit number to a new value.

Syntax

[nadv] = x04ab(iflag, nadv)
[nadv] = nag_file_set_unit_advisory(iflag, nadv)

Description

nag_file_set_unit_advisory (x04ab) enables those library functions which output advisory messages to determine the number of the output unit to which the advisory messages are to be sent; in this case nag_file_set_unit_advisory (x04ab) is called with iflag=0. nag_file_set_unit_advisory (x04ab) 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 120 characters long (including a line-printer carriage control character), unless those library functions allow you to specify longer records.
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 nadv).
Constraint: iflag=0 or 1.
2:     nadv int64int32nag_int scalar
If iflag=0, nadv need not be set.
If iflag=1, nadv must specify the new advisory message unit number.

Optional Input Parameters

None.

Output Parameters

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

Error Indicators and Warnings

None.

Accuracy

Not applicable.

Further Comments

The time taken by nag_file_set_unit_advisory (x04ab) is negligible.

Example

function x04ab_example


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

iflag = int64(1);
nadv = int64(6);

[nadv] = x04ab(iflag, nadv);

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


x04ab example results

The advisory 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