X04 Chapter Contents
X04 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentX04BAF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

X04BAF writes a single formatted record to an external file.

## 2  Specification

 SUBROUTINE X04BAF ( NOUT, REC)
 INTEGER NOUT CHARACTER(*) REC

## 3  Description

X04BAF is used by NAG Library routines to write formatted records to an external file. All formatted output to an external file from NAG Library routines is performed by calls to X04BAF.

None.

## 5  Parameters

1:     NOUT – INTEGERInput
On entry: the Fortran unit number which identifies the file to be written to. If ${\mathbf{NOUT}}<0$ (not a valid Fortran unit number), then no output occurs. Within the NAG Library NOUT is always determined by a call to X04AAF or X04ABF.
2:     REC – CHARACTER(*)Input
On entry: a character-string. This is written to the external file as a single record. Trailing blanks are not output, except that if REC is entirely blank, a single blank character is output. If the record is printed, the first character is treated as a carriage-control character.

None.

Not applicable.

None.

## 9  Example

This example program simply illustrates how a formatted record is output from the NAG Library, by first writing it to the character-string REC, used as an internal file, and then passing the character-string to X04BAF.

### 9.1  Program Text

Program Text (x04bafe.f90)

None.

### 9.3  Program Results

Program Results (x04bafe.r)