This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Error: Invalid form of array reference at (1)
On Tue, Feb 08, 2011 at 12:34:09PM -0800, laurbert515 wrote:
>
> ! do phicounter = 1,nphi
> ! do thetacounter = 1,ntheta
> ! do rcounter = 1, nr
> ! summation = summation +
> f(thetacounter,phicounter)*(r(rcounter)**2)*sin(theta(thetacounter))*wr(rcounter)*wtheta(thetacounter)*wphi(phicounter)
Either my email client or yours is splitting long line,
because the above two lines are not valid Fortran. If
I unwrap the line, I get
troutmask:sgk[207] gfc4x -c v.f90
v.f90:31.132:
*(r(rcounter)**2)*sin(theta(thetacounter))*wr(rcounter)*wtheta(thetacounter
1
Error: Invalid form of array reference at (1)
So, yes, your lines are too long. IMNSHO, anything over
80 characters is too long.
--
Steve