Array Constructors
- From: cjk32@xxxxxxxxx
- Date: 28 Feb 2007 03:05:40 -0800
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. For
example, if I do:
integer :: i
integer :: XYZ(8)
call date_and_time(values = XYZ)
i = 42
write (*,"(I5)") i
write (*,"(8I5)") (/(XYZ(i),i=1,8)/)
write (*,"(I5)") i
will the last line written always be 42. Intuitively, it felt like it
should be, as I would hope that the two i's are total separate.
However, IVF complained if the variable used in the array constructor
had not been declared (with implicit none set). It does works with
IVF, but I can't see anything in the documentation that states this
must always be the case.
Chris
.
- Follow-Ups:
- Re: Array Constructors
- From: Steve Lionel
- Re: Array Constructors
- From: Michael Metcalf
- Re: Array Constructors
- From: Arjen Markus
- Re: Array Constructors
- Prev by Date: Re: OpenMP: data scoping and modules
- Next by Date: Re: Intel Support
- Previous by thread: array-valued function as dummy argument
- Next by thread: Re: Array Constructors
- Index(es):
Relevant Pages
|
|