Standard: F77 F90 F95 F2003 F2008 Example program


ASYNCHRONOUS = expression

The expression must be a scalar character expression. This specifier is permitted in the INQUIRE, OPEN, READ and WRITE statements. In the INQUIRE statement, it must be a variable designator, and is assigned the value 'YES', 'NO' or 'UNDEFINED'; in all other statements it must evaluate to 'YES' or 'NO' (ignoring case).

In the READ and WRITE statements it must be a constant expression.


The ASYNCHRONOUS= specifier determines whether asynchronous input/output is anticipated (for OPEN), permitted (for INQUIRE) or being requested (for READ and WRITE).

An asynchronous READ or WRITE is only permitted on a file that is connected for asynchronous input/output (i.e. opened with ASYNCHRONOUS='YES').

An asynchronous READ or WRITE is not required to act asynchronously, this is only a request to the Fortran processor. The ID= specifier and the PENDING= specifier may be used to control or inquire on the progress of an asynchronous input/output operation.

A variable that is subject to asynchronous input/output must have the ASYNCHRONOUS attribute; this is conferred implicitly in any scoping unit that contains a relevant asynchronous READ or WRITE statement using that variable, but must be declared explicitly if it remains subject to asynchronous input/output on return to another scoping unit.

Note that ASYNCHRONOUS='YES' is not permitted on a READ or WRITE statement that invokes a defined input/output procedure.


ASYNCHRONOUS attribute, Defined input/output, ID= specifier, INQUIRE statement, OPEN statement, PENDING= specifier, READ statement, WRITE statement