I have always tried to avoid this topic, but now finally have to. I am to read an unformatted binary file that has been written by a fortran 90 program on a unix machine. I expect the format is both big-endian and also sequential access binary, so I want to convert it to little-endian and Salford unformatted binary. It contains integers, reals and complex numbers.
From the info I have read, I am assuming I need to:
Record length : account for the difference between the unix and salford binary format, so cope with 2-byte or 4-byte record length headers.
big-endian : convert all integer formats from big-endian to little endian, including the record headers.
( an FTN95 OPEN option something like RECORD_HEADER=('4' or '2/4') or RECORD_LENGTH=('BYTES' or 'WORDS') could solve this problem when creating a file to be read by programs compiled by other compilers )
My understanding is that reals and complex are little-endian in a unix binary file format (sourse Wikipedia), so do not need to be changed (?)
Is anyone familiar with this and could advise if my expectations are correct or not.
John