Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

error #6099: An ENDDO statement occurred without a corresponding DO or DO WHILE statement

milenko1976
Beginner
3,075 Views

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?

0 Kudos
2 Replies
bpichon
Beginner
3,075 Views

An endif is missing

BTW try to use internal I/O viz Write(tfile(1:2),"(I2.2)") iter    !!!!

0 Kudos
jimdempseyatthecove
Honored Contributor III
3,075 Views

Your IF statement (after DO) has no corrisponding ENDIF (before END DO).

Jim Dempsey

0 Kudos
Reply