SCDzine
Spring 1999, Vol. 20, No. 1
H I N T

How to read IEEE files on DEC computers

Four methods for "little-endian" machines . . .

Tom Parker
Tom Parker


Contents

SCDzine

Search

Article index

Subscribe

Contact us

SCD

by Tom Parker

IEEE binary is "big-endian" on most UNIX machines. However on DEC computers, it defaults to "little-endian". If you are a DEC user, here is how you can use big-endian IEEE files in a Fortran program on your little-endian machine.

Basically, there are four methods. The first two work on individual files. The latter two work on all files.

  1. Use an environment variable:

      setenv FORT_CONVERT10 BIG_ENDIAN # For unit 10

  2. Use the OPEN statement:

      OPEN (UNIT=10,CONVERT='BIG_ENDIAN',FORM='UNFORMATTED',...)

  3. Use the OPTIONS statement (put it in your source code, just like an INCLUDE statement):

      OPTIONS /CONVERT=BIG_ENDIAN

  4. Use the command-line option:

      f90 -convert big_endian ...


For more information

For more information on reading IEEE files on DEC computers, see the following websites:

rule
Contents || SCDzine || Search || Article index || Subscribe || Contact us || SCD