Do loop problem: iteration variable suddenly changing value
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Do loop problem: iteration variable suddenly changing value         

Group: comp.lang.fortran · Group Profile
Author: andrea.m
Date: Oct 2, 2007 09:28

I am having the following problem: here is the code snippet (this is
from a public domain code, quadpack.f90)

7972 do k = 1, 5
7973 absc = hlgth*x1(k)
7974 fval1 = f(centr+absc)
7975 fval2 = f(centr-absc)
7976 fval = fval1+fval2
7977 res10 = res10+w10(k)*fval
...
enddo

At some point at the first iteration (k=1), after the execution of
line 7975 k becomes equal to 6 (six), and the program stops at 7977
because of an array out of bounds. I checked the external function f,
I have no idea what is happening.

This is with digital fortran compiler 6.0.0. Any idea how I can debug
or solve the problem?
4 Comments
diggit! del.icio.us! reddit!