Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Input-loop/Fortran/input-loop.f
Normal file
20
Task/Input-loop/Fortran/input-loop.f
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
program BasicInputLoop
|
||||
|
||||
implicit none
|
||||
|
||||
integer, parameter :: in = 50, &
|
||||
linelen = 1000
|
||||
integer :: ecode
|
||||
character(len=linelen) :: l
|
||||
|
||||
open(in, file="afile.txt", action="read", status="old", iostat=ecode)
|
||||
if ( ecode == 0 ) then
|
||||
do
|
||||
read(in, fmt="(A)", iostat=ecode) l
|
||||
if ( ecode /= 0 ) exit
|
||||
write(*,*) trim(l)
|
||||
end do
|
||||
close(in)
|
||||
end if
|
||||
|
||||
end program BasicInputLoop
|
||||
Loading…
Add table
Add a link
Reference in a new issue