Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

OPEN: NEWUNIT Specifier

The NEWUNIT specifier opens a file on an unused unit number that is automatically chosen. It also returns the unit number that was chosen. It takes the following form:

NEWUNIT = u-var

u-var

Is a scalar integer variable that is assigned the automatically chosen unit number. It is always a negative integer.

If the OPEN is successful, u-var can be used in subsequent I/O statements to access the connected file.

If an error occurs during execution of the OPEN statement containing the NEWUNIT= speciifier, the processor does not change the value of the variable.