This chapter contains utility methods concerned with input and output to or from an external file.

Syntax

C#
public static class X04
Visual Basic
Public NotInheritable Class X04
Visual C++
public ref class X04 abstract sealed
F#
[<AbstractClassAttribute>]
[<SealedAttribute>]
type X04 =  class end

Background to the Problems

Output from NAG Library Methods

Output from NAG Library methods to an external file falls into two categories.
(a) Error messages
which are always associated with an error exit from a method, that is, with a nonzero value of ifail as specified in Section 6 of the method document.
(b) Advisory messages
which include output of final results, output of intermediate results to monitor the course of a computation, and various warning or informative messages.
Each category of output is written to its own Fortran output unit – the error message unit or the advisory message unit. In practice these may be the same unit number. Default unit numbers are provided for each implementation of the Library (see the Users' Note for your implementation); they may be changed by users. Output of error messages may be controlled by the setting of ifail (see Library Overview). Output of advisory messages may usually be controlled by the setting of some other parameter (e.g., MSGLVL) (or in some methods also by ifail). An alternative mechanism for completely suppressing output is to set the relevant unit number <0.
At present only formatted records are output from the Library. All formatted output to an external file from within the Library is performed by (X04BAF not in this release). Similarly, all formatted input from an external file is performed by (X04BBF not in this release).

Matrix Printing Methods

Methods are provided to allow formatted output of
(a) general matrices stored in a two-dimensional array (real, complex and integer data types);
(b) triangular matrices stored in a packed one-dimensional array (real and complex data types);
(c) band matrices stored in a packed two-dimensional array (real and complex data types).
Methods in (b) and (c) allow printing of matrices stored in formats used in particular by F06 class F07 class of the Library.
By appropriate choice of arguments you can specify titles, labels, maximum output record length, and the format of individual matrix elements. All output is directed to the advisory messages unit, which may be altered by a call to (X04ABF not in this release).

Inheritance Hierarchy

System..::..Object
  NagLibrary..::..X04

See Also