
Oh, it didn't even occur to me that the OP didn't know about the

Byte swapping them > will result in corrupted records. > F77 unformatted files contain record length data. Unit: 100 > File: /tmp/test_conc > % Execution halted at: $MAIN$ > Has anyone encountered this behavior? > -Edward H. On 04/06/15 15:43, wrote: > On Monday, Apat 8:04:05 PM UTC+2, Edward Hyer wrote: > open and write a file using F77_UNFORMATTED > IDL> openw,lun,/get_lun,/f77,'/tmp/test_f77' > IDL> writeu,lun,long(2015032518),float(6),long(0) > IDL> free_lun,lun > read the file back in > IDL> openr,lun,/get_lun,/f77,'/tmp/test_conc' > IDL> qq1=long(0) & qq2=float(0) & qq3=long(0) > IDL> readu,lun,qq1,qq2,qq3 > IDL> print,qq1,qq2,qq3 > 2013052306 6.00000 0 > IDL> free_lun,lun > now try reading it with /SWAP_IF_LITTLE_ENDIAN > IDL> openr,lun,/get_lun,/f77,'/tmp/test_conc',/swap_if_little_end ian > IDL> readu,lun,qq1,qq2,qq3 > % READU: Corrupted f77 unformatted file detected.

But, last time I checked/cared, IDL wasn'tīeing developed anymore for those platforms (e.g. Now, if you're on a big-endian machine (e.g. This is what should happen on a little endian machine. % READU: Corrupted f77 unformatted file detected.
.jpg)
IDL> openr,lun,/get_lun,/f77,'tmp.test_f77',/swap_if_little_endia n At least, when I read in the same file I write! (you have Unit: 100 > File: /tmp/test_conc > % Execution halted at: $MAIN$ > Has anyone encountered this behavior?

On 04/06/15 14:04, Edward Hyer wrote: > open and write a file using F77_UNFORMATTED > IDL> openw,lun,/get_lun,/f77,'/tmp/test_f77' > IDL> writeu,lun,long(2015032518),float(6),long(0) > IDL> free_lun,lun > read the file back in > IDL> openr,lun,/get_lun,/f77,'/tmp/test_conc' > IDL> qq1=long(0) & qq2=float(0) & qq3=long(0) > IDL> readu,lun,qq1,qq2,qq3 > IDL> print,qq1,qq2,qq3 > 2013052306 6.00000 0 > IDL> free_lun,lun > now try reading it with /SWAP_IF_LITTLE_ENDIAN > IDL> openr,lun,/get_lun,/f77,'/tmp/test_conc',/swap_if_little_end ian > IDL> readu,lun,qq1,qq2,qq3 > % READU: Corrupted f77 unformatted file detected.
