I have the code below and I want to remove the "go to" statements. Any idea how I can do it?
if (iorder == 0) then
tmincurrent = 1.0e11
if(ireverse == 0 .or. istop /= 1) then
do i = 1, 6
if ((side(i) /= sidelimit(i)) .and. (tminside(i) < tmincurrent)) then
tmincurrent = tminside(i)
iside = i
end if
end do
else
do i = 1, 6
if(side(i) /= sidestop(i) .and. tminside(i) < tmincurrent) then
tmincurrent = tminside(i)
iside = i
end if
end do
end if
else
if ((ireverse == 0) .or. (istop /= 1)) then
2120 ioc = ioc + 1
if (ioc < 7) then
iside = order(ioc)
if (side(iside) /= sidelimit(iside)) go to 2130
else
ioc = 0
end if
go to 2120
else
2140 ioc = ioc + 1
if (ioc < 7) then
iside = order(ioc)
if (side(iside) /= sidestop(iside)) go to 2130
else
ioc = 0
end if
go to 2140
end if
end if
2130 continue