I want to store newline character in my character buffer variable buff. So far my code goes like this:
program TYPE_CHECK
c newline storage in buffer
character(100), dimension(10) :: buff
integer, dimension(10) :: x
integer :: i
do i=1,10
x(i) = i
enddo
do j=1,10
write(buff(j), 1) x(j), x(j)
1 format(' This is line ', I3, /,
* ' This is newline ', I3)
enddo
do j=1,10
write(*, "(A100)") buff(j)
enddo
end program TYPE_CHECK
This gives the following error:
At line 13 of file myfoo6.F
Fortran runtime error: End of file