Visible to Intel only — GUID: GUID-616302F5-5327-480F-9671-E1E684B54C86
Visible to Intel only — GUID: GUID-616302F5-5327-480F-9671-E1E684B54C86
Physical Devices on Windows
Input/Output (I/O) statements that do not refer to a specific file or I/O device read from standard input and write to standard output. Standard input is the keyboard, and standard output is the screen (console). To perform input and output on a physical device other than the keyboard or screen, specify the device name as the file name to be read from or written to.
Some physical device names are determined by the host operating system; others are recognized by Intel® Fortran. Extensions on most device names are ignored.
The following table shows file names for device I/O:
Device |
Description |
---|---|
CON |
Console (standard output) |
PRN |
Printer |
COM1 |
Serial port #1 |
COM2 |
Serial port #2 |
COM3 |
Serial port #3 |
COM4 |
Serial port #4 |
LPT1 |
Parallel Port #1 |
LPT2 |
Parallel Port #2 |
LPT3 |
Parallel Port #3 |
LPT4 |
Parallel Port #4 |
NUL |
NULL device. Discards all output; contains no input. |
AUX |
Serial port #1 |
LINE |
Serial port #1 |
USER |
Standard output |
ERR |
Standard error |
CONOUT$ |
Standard output |
CONIN$ |
Standard input |
If you use the LINE, USER, or ERR name with an extension, for example, LINE.TXT, Fortran will write to a file rather than to the device.
Examples of opening physical devices as units are:
OPEN (UNIT = 4, FILE = 'PRN')
OPEN (UNIT = 7, FILE = 'LPT2', ERR = 100)