- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My module:
module m3
contains
subroutine pk(iter,c4)
integer,intent(in) ::iter
integer,intent(in) ::c4
real,dimension(:),allocatable :: b11,b22
integer :: n,i,id1,id2
character(10) :: tfile=" .mtf"
character(10) :: pfile=" .log"
allocate(b11(c4))
allocate(b22(c4))
id1=iter/10
id2=iter-10*id1
tfile(1:2)=CHAR(id1+48)//CHAR(id2+48)
pfile(1:2)=CHAR(id1+48)//CHAR(id2+48)
open(20,file=tfile)
open(21,file=pfile)
do i=1,c4,1
read(21,50)b11(i),b22(i)
50 format(19x,f11.4,4x,f11.4)
if (mod(i,4)==0) then
b11(i)=b11(i)+180
write(20,51)b11(i),b22(i)
51 format(f11.4,4x,f11.4)
end do
deallocate(b11)
deallocate(b22)
end subroutine
end module
SO I really do net understand what is happening here?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An endif is missing
BTW try to use internal I/O viz Write(tfile(1:2),"(I2.2)") iter !!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your IF statement (after DO) has no corrisponding ENDIF (before END DO).
Jim Dempsey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page