Intel® Fortran Compiler 16.0 User and Reference Guide

Compiler Option -convert or /convert Method

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 convert keyword 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 keyword method to specify each unit number that will use a format different than that specified using the convert keyword 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, S_floating, T_floating, and X_floating little endian IEEE* floating-point format). The created file, vconvert.exe, can then be run:

Example

// Windows*
  ifort file.for /convert:vaxd /link /out:vconvert.exe

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 convert keyword compiler option alone. You can if you use it in combination with the environment variable methods or the OPEN statement convert keyword method to specify a different format for a particular unit number.

Related information
convert
Methods of Specifying the Data Format