Error: Invalid form of array reference at (1)

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Feb 8 20:26:00 GMT 2011


On Tue, Feb 08, 2011 at 12:12:04PM -0800, laurbert515 wrote:
> 
> this works fine ...

How?

> ---------------------------------------------------
> 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)

This cannot be the actual code.  There is no continuation
character.  No to mention that is I unwrap the line into
a single line, there are 150 characters.  That's 18
characters too many for a valid line of code.

> ----------------------------------------------------
> 
> while this gives me the error referenced in the subject title ...
> 

If you want help, we need to see the actual code and the
actual error message.  In particular, we have no idea
whether the arrays you show are actually declared as
arrays.

PS: J3 invented & for a reason.

-- 
Steve



More information about the Fortran mailing list