Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

reading dosformatted files in UNIX

seynaekr
Beginner
906 Views
I just red the conversation about the option 'recordtype' in the open statement to read dosfiles (CR-LF)in UNIX. When I used this in my program, I got the message that this item is not allowed for this I/O statement. After some readingin the manual about this topic, I found out that this is a fortran95 topic and we are working with fortran90. Is there a tool in fortran90 that has the same properties??
0 Kudos
3 Replies
TimP
Honored Contributor III
906 Views
STREAM_LF is an f2003 feature. If you want to read CR_LF files with all older compilers, you may have to make a copy with CR filtered out, before OPENing it. For example, you might run the common dos2unix utility from SYSTEM(). So, no, there was no fully standard way to do this in the past.
0 Kudos
Steven_L_Intel1
Employee
906 Views
Intel Fortran supports FORM='BINARY' which allows you to read an arbitrary stream of bytes using unformatted I/O.
0 Kudos
seynaekr
Beginner
906 Views

ThanX tim18!

kristien

0 Kudos
Reply