6.1.15. CONVERT specifier

6.1.15 CONVERT specifier

GNU Fortran allows the conversion of unformatted data between little- and big-endian representation to facilitate moving of data between different systems. The conversion can be indicated with the CONVERT specifier on the OPEN statement. See GFORTRAN_CONVERT_UNIT, for an alternative way of specifying the data format via an environment variable.

Valid values for CONVERT are:

  • CONVERT='NATIVE' Use the native format. This is the default.
  • CONVERT='SWAP' Swap between little- and big-endian.
  • CONVERT='LITTLE_ENDIAN' Use the little-endian representation for unformatted files.
  • CONVERT='BIG_ENDIAN' Use the big-endian rep