Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

How to read long lines

Intel_C_Intel
Employee
505 Views
Sorry if this is a trivial question:

How do I read a long line (>132 characters) into a character*512 variable?

I seem to remember opening the file with recl=512 (say), did the trick, but is not working for me with cvf 6.6a.

BTW, I am using

CHARACTER*512 BUF
READ(UNIT,'(A)' ) BUF

Thanks,

Gabriel
0 Kudos
2 Replies
james1
Beginner
505 Views
Should work without RECL. What does your OPEN statement look like and what sort of error/results are you seeing?

James
0 Kudos
Intel_C_Intel
Employee
505 Views
Never mind! the problem was in another program (not in the one I was looking at) and it was trivial.

Gabriel
0 Kudos
Reply