If you do not use an OPEN statement to open logical unit 5, 6, or 0 and do not set the appropriate environment variable (FORTn), Intel Fortran,at run time, implicitly opens (preconnected) units 5, 6, and 0 and associates them with the following operating system standard I/O files:
Unit |
Environment Variable |
Equivalent Linux* Standard I/O File |
5 |
FORT5 |
Standard input, stdin |
6 |
FORT6 |
Standard output, stdout |
0 |
FORT0 |
Standard error, stderr |
You can change these preconnected files by doing one of the following:
Using an OPEN statement to open unit 5, 6, or 0. When you explicitly OPEN a file for unit 5, 6, or 0, the OPEN statement keywords specify the file-related information to be used instead of the preconnected standard I/O file.
Setting the appropriate environment variable (FORTn) to redirect I/O to an external file.
To redirect input or output from the standard preconnected files at run time, you can set the appropriate environment variable or use the appropriate shell redirection character in a pipe (such as > or <).