Intel® Fortran Compiler 17.0 Developer Guide and Reference
You can only specify one numeric format for all unformatted file unit numbers using the convert compiler option unless you also use one (or more) of the previous methods shown in Methods of Specifying the Data Format.
You specify the numeric format at compile time and must compile all routines under the same convertkeyword compiler option. You can use the same source program and compile it using different ifort commands (or the equivalent in the IDE) to create multiple executable programs that each read a certain format.
If you specify other methods, the other methods take precedence over using this method. For instance, you might use the environment variable or OPEN statement CONVERT specifier method to specify each unit number that will use a format different than that specified using the convertkeyword compiler option method for all other unit numbers.
For example, the following command compiles program file.for to use VAX D_floating (and F_floating) floating-point data for all unit numbers (unless superseded by one of the other methods). Data is converted between the file format and the little endian memory format (little endian integers, IEEE binary32, IEEE binary64, and IEEE binary128 little endian IEEE* floating-point format). The created file, vconvert.exe, can then be run:
Example |
---|
|
Because this method affects all unformatted file unit numbers, you cannot read data in one format and write it in another file format using the convertkeyword compiler option alone. You can if you use it in combination with the environment variable methods or the OPEN statement CONVERT specifier method to specify a different format for a particular unit number.