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_line_write (x04ba)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_file_line_write (x04ba) writes a single formatted record to an external file.

Syntax

x04ba(nout, rec)
nag_file_line_write(nout, rec)

Description

nag_file_line_write (x04ba) is used by NAG Library functions to write formatted records to an external file. All formatted output to an external file from NAG Library functions is performed by calls to nag_file_line_write (x04ba).

References

None.

Parameters

Compulsory Input Parameters

1:     nout int64int32nag_int scalar
The Fortran unit number which identifies the file to be written to. If nout<0 (not a valid Fortran unit number), then no output occurs. Within the NAG Toolbox nout is always determined by a call to nag_file_set_unit_error (x04aa) or nag_file_set_unit_advisory (x04ab).
2:     rec – string
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.

Optional Input Parameters

None.

Output Parameters

None.

Error Indicators and Warnings

None.

Accuracy

Not applicable.

Further Comments

None.

Example

This example program simply illustrates how a formatted record is output from the NAG Toolbox, by first writing it to the character-string rec, used as an internal file, and then passing the character-string to nag_file_line_write (x04ba).
function x04ba_example


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

nout = int64(6);
rec = ' This record was output by X04BAF       ';
x04ba(nout, rec);


x04ba example results

 This record was output by X04BAF

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