The 1001 standard has nothing to do with this code, and more to do with our simulation codes which are written in FORTRAN77 and my professor's old standards.

As for the efficency comments I will keep those in mind.

The fclose should be there, I could have sworn it was, but even with it is does not quite change the fact that my arry[] is not being filled properly in that while loop.