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)

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 = 0iflag=0. nag_file_set_unit_advisory (x04ab) 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 120120 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<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 = 0iflag=0 or 11.
2:     nadv – int64int32nag_int scalar
If iflag = 0iflag=0, nadv need not be set.
If iflag = 1iflag=1, nadv must specify the new advisory message unit number.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     nadv – int64int32nag_int scalar
If iflag = 0iflag=0, nadv is set to the current advisory message unit number.
If iflag = 1iflag=1, nadv is unchanged.
Note that Fortran unit numbers must be positive or zero. If nadv is set < 0<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 nag_file_set_unit_advisory_example
iflag = int64(1);
nadv = int64(6);
[nadvOut] = nag_file_set_unit_advisory(iflag, nadv)
 

nadvOut =

                    6


function x04ab_example
iflag = int64(1);
nadv = int64(6);
[nadvOut] = x04ab(iflag, nadv)
 

nadvOut =

                    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