PROGRAM bufferedIoTest
! buffered i/o example: compile with +autodbl
INTEGER a(10)
OPEN ( UNIT = 7, NAME = ’test.dat’, FORM = ’UNFORMATTED’ )
a = (/ (i,i=1,10) /) ! initialize the array A
BUFFER OUT ( 7, 0 ) ( a, a(10) ) ! write out A twice
CALL unit ( 7 )
BUFFER OUT ( 7, 0 ) ( a, a(10) )
CALL unit ( 7 )
! now position the file 40 bytes (5 integer values) into the file
CALL setpos ( 7, 5 )
! read the remainder of the 1st record, and half of the second
BUFFER IN ( 7, 0 ) ( a, a(10) )
WRITE(6,*) a
CLOSE (7)
END PROGRAM bufferedIoTest
This is a program in "HP Fortran 90 Programmer's Reference":It cannot compiler in intel fortran compiler.I want to know how to replace it in ivf,thanks!
! buffered i/o example: compile with +autodbl
INTEGER a(10)
OPEN ( UNIT = 7, NAME = ’test.dat’, FORM = ’UNFORMATTED’ )
a = (/ (i,i=1,10) /) ! initialize the array A
BUFFER OUT ( 7, 0 ) ( a, a(10) ) ! write out A twice
CALL unit ( 7 )
BUFFER OUT ( 7, 0 ) ( a, a(10) )
CALL unit ( 7 )
! now position the file 40 bytes (5 integer values) into the file
CALL setpos ( 7, 5 )
! read the remainder of the 1st record, and half of the second
BUFFER IN ( 7, 0 ) ( a, a(10) )
WRITE(6,*) a
CLOSE (7)
END PROGRAM bufferedIoTest
This is a program in "HP Fortran 90 Programmer's Reference":It cannot compiler in intel fortran compiler.I want to know how to replace it in ivf,thanks!