Re: undefined variable problem
- From: Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx>
- Date: Fri, 30 Mar 2007 19:53:48 GMT
On 2007-03-30, John Appleyard <spamtrap@xxxxxxxxxxxxxx> wrote:
Check out Catherine's reply again. I think you may have misunderstood
what the compiler means by "undefined". It doesn't mean "not allocated"
or "not declared" or "not associated". It means "used before set" -
i.e. no value has been assigned to a since it was created (by allocation
or whatever). It is an error to use the value of a variable if it has
never been given a value, and that is what the compiler is complaining
about.
Hmm... now that I think of it... i've fixed a problem that made
the error go away... maybe it is what you are mentioning here...
The situation I have basically boils down to the following: I
allocated a rank 2 array (representing a matrix), and i only
assigned values to the *lower triangular part*. My application
required the *upper triangular part without the diagonal* to be
zero... but i forgot to
explicitly set that part to zero... so after allocation and setting
the lower triangular part, I couldn't be sure that the values in the
upper triangular part were zero...
Could it be that the NAGWare f95 compiler was smart enough to
detect that the *upper triangular part* of the rank2 array
(matrix) that I was using was not initialised and therefore
reported the error?
Best wishes,
Bart
--
"Share what you know. Learn what you don't."
.
- Follow-Ups:
- Re: undefined variable problem
- From: glen herrmannsfeldt
- Re: undefined variable problem
- From: Gordon Sande
- Re: undefined variable problem
- References:
- undefined variable problem
- From: Bart Vandewoestyne
- Re: undefined variable problem
- From: Bart Vandewoestyne
- Re: undefined variable problem
- From: John Appleyard
- undefined variable problem
- Prev by Date: Re: Starting to doubt fortran
- Next by Date: Re: undefined variable problem
- Previous by thread: Re: undefined variable problem
- Next by thread: Re: undefined variable problem
- Index(es):
Relevant Pages
|