2 ! sequential access files
4 ! this test verifies the most basic sequential unformatted I/O
5 ! write 3 records of various sizes
7 ! and compare with what was written
14 ! set debug to true for help in debugging failures.
25 write(9)m
! an array of 2
26 write(9)n
! an integer
27 write(9)r
! an array of reals
28 ! zero all the results so we can compare after they are read back
42 if (m(1).ne
.Z
'11111111') then
44 print '(A,Z8)','m(1) incorrect. m(1) = ',m(1)
50 if (m(2).ne
.Z
'22222222') then
52 print '(A,Z8)','m(2) incorrect. m(2) = ',m(2)
58 if (n
.ne
.Z
'33333333') then
60 print '(A,Z8)','n incorrect. n = ',n
67 if (int(r(i
)).ne
.i
) then
69 print*,'element ',i
,' was ',r(i
),' should be ',i
75 ! use hexdump to look at the file "fort.9"
79 close(9,status
='DELETE')