2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: open, action
8 .. _files-opened-without-an-explicit-action=-specifier:
10 Files opened without an explicit ACTION= specifier
11 **************************************************
13 The Fortran standard says that if an ``OPEN`` statement is executed
14 without an explicit ``ACTION=`` specifier, the default value is
15 processor dependent. GNU Fortran behaves as follows:
17 * Attempt to open the file with ``ACTION='READWRITE'``
19 * If that fails, try to open with ``ACTION='READ'``
21 * If that fails, try to open with ``ACTION='WRITE'``
23 * If that fails, generate an error