nag_read_line (x04bbc) (PDF version)
x04 Chapter Contents
x04 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_read_line (x04bbc)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1  Purpose

nag_read_line (x04bbc) reads a single line from an external file.

2  Specification

#include <nag.h>
#include <nagx04.h>
void  nag_read_line (Nag_FileID fileid, char *line, Integer linelen, NagError *fail)

3  Description

nag_read_line (x04bbc) may be used to read from files opened with nag_open_file (x04acc).

4  References

None.

5  Arguments

1:     fileid Nag_FileIDInput
On entry: the identifier of the file to be read from. This must have been returned by a call of nag_open_file (x04acc).
2:     line char *Output
A character buffer of length linelen.
On exit: contains a null-terminated character-string read from the file associated with the FileID. If line is too small to hold the entire string, excess characters are discarded.
3:     linelen IntegerInput
On entry: the size of the character buffer line. If linelen0, no characters are read and line is unchanged.
4:     fail NagError *Input/Output
The NAG error argument (see Section 2.7 in How to Use the NAG Library and its Documentation).

6  Error Indicators and Warnings

NE_READ_ERROR
Error occurred when reading from FileID value.

7  Accuracy

Not applicable.

8  Parallelism and Performance

nag_read_line (x04bbc) is not threaded in any implementation.

9  Further Comments

None.

10  Example

See Section 10 in nag_open_file (x04acc).

nag_read_line (x04bbc) (PDF version)
x04 Chapter Contents
x04 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2016