Software Archive
Read-only legacy content

WIN ME I/O

Intel_C_Intel
Employee
444 Views
I have programs written for unix that I am porting to the PC. I have routines for writting and reading unformatted direct access files. I open the files with
open (10,file='file10',access='direct',form='unformatted',recl=lrecl ,status='unknown')

where lrecl =4*512

then when i compile i use:
/align:norecords /align:nocommons /align:nodcommons

When i read the data I get the correct data up to value 511. (maybe 512)

There seems likes lots of combinations of compile and open options(like buffered)

Does any one have any ideas about this problem?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
444 Views
Try changing the 4*512 to just 512. In Compaq Fortran, the default RECL unit for unformatted files is 4-byte longwords, not bytes. You can change this with /assume:byterecl Should be all you need.

Steve
0 Kudos
Intel_C_Intel
Employee
444 Views
Thanks Steve:)

/assume:byterecl was all I needed
0 Kudos
Reply