Intel® Fortran Compiler 16.0 User and Reference Guide
The operating system influences your program both externally and internally. For increased portability, you need to minimize the amount of operating-system-specific information required by your program. The Fortran language standards do not specify this information.
Operating-system-specific information consists of non-intrinsic extensions to the language, compiler and linker options, and possibly the graphical user interface of Windows*. Input and output operations use devices that may be system-specific and may involve a file system with system-specific record and file structures.
The operating system also governs resource management and error handling. You can depend on default resource management and error handling mechanisms or provide mechanisms of your own. For information on special library routines to help port your program from one system to another, see Portability Library Overview and related topics.
The minimal interaction with the operating system is for input/output (I/O) operations and usually consists of knowing the standard units preconnected for input and output. You can use default file units with the asterisk (*) unit specifier.
To increase the portability of your programs across operating systems, consider the following:
Do not assume the use of a particular type of file system.
Do not embed filenames or paths in the body of your program. Define them as constants at the beginning of the program or read them from input data.
Do not assume a particular type of standard I/O device or the "size" of that device (number of rows and columns).
Do not assume display attributes for the standard I/O device. Some environments do not support attributes such as color, underlined text, blinking text, highlighted text, inverse text, protected text, or dim text.