Methods of Specifying the Data Format: Overview

There are six methods of specifying a nonnative numeric format for unformatted data:

If none of these methods are specified, the native LITTLE_ENDIAN format is assumed (no conversion occurs between disk and memory).

Any keyword listed in Supported Native and Nonnative Numeric Formats can be used with any of these methods, except for the Environment Variable F_UFMTENDIAN Method, which supports only LITTLE_ENDIAN and BIG_ENDIAN.

If you specify more than one method, the order of precedence when you open a file with unformatted data is to:

  1. Check for an environment variable (FORT_CONVERTn) for the specified unit number (applies to any file opened on a particular unit).

  2. Check for an environment variable (FORT_CONVERT.ext is checked before FORT_CONVERT_ext) for the specified file name extension (applies to all files opened with the specified file name extension).

  3. Check for an environment variable (F_UFMTENDIAN) for the specified unit number (or for all units).

  4. Check the OPEN statement CONVERT qualifier.

  5. Check whether an OPTIONS statement with a CONVERT=keyword qualifier was present when the program was compiled.

  6. Check whether the compiler option -convert keyword was present when the program was compiled.