Re: Array Constructors
- From: cjk32@xxxxxxxxx
- Date: 28 Feb 2007 06:43:00 -0800
On 28 Feb, 12:50, "Michael Metcalf" <michaelmetc...@xxxxxxxxxxxxxx>
wrote:
<c...@xxxxxxxxx> wrote in message
news:1172660739.879054.15000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
Can anyone confirm that when a variable is used in an implied do loop
in an array constructor, is its value always restored afterwards.
Please note that the do variable of an implied-do in a DATA statement or an
array constructor has a scope that is just the implied-do. It is different
from any other entity with the same name (i.e., you have two variables
called i in your snippet, so to think about 'restoring' is not correct).
(See also MR&C, Section 5.15.)
That was my initial thought, but IVF complaining if *a* variable, i,
wasn't declared somewhere in the same scope in unsettled me somewhat.
Arjen makes a good point, but if I try it with a non integer variable,
IVF complains again, saying that an integer is required. I guess this
is just a bug in the IVF compiler.
I assume 'MR&C' refers to an official fortran spec. Is that available
online anywhere?
Regards,
Chris
.
- Follow-Ups:
- Re: Array Constructors
- From: *** Hendrickson
- Re: Array Constructors
- From: Michael Metcalf
- Re: Array Constructors
- References:
- Array Constructors
- From: cjk32
- Re: Array Constructors
- From: Michael Metcalf
- Array Constructors
- Prev by Date: Re: OpenMP: data scoping and modules
- Next by Date: Re: Intel Support
- Previous by thread: Re: Array Constructors
- Next by thread: Re: Array Constructors
- Index(es):