Re: Substring in DATA implied-do
- From: "Lane Straatman" <invalid@xxxxxxxxxxx>
- Date: Wed, 14 Feb 2007 00:39:15 -0500
"Dick Hendrickson" <dick.hendrickson@xxxxxxx> wrote in message
news:rwsAh.37363$2m6.33903@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
John Harper wrote:This looks like something lifted directly from the standard. What do the
I think both the f95 and f2003 standards forbid a program beginning thus:Interesting that the compilers agree with you. The F2003 standard has
CHARACTER string*1025
INTEGER i
DATA (string(i:i),i=1,1025)/1025*'?'/
but allow one to begin thus:
TYPE longstr
CHARACTER string*1025
END TYPE longstr
TYPE(longstr)::example
INTEGER i
DATA (example%string(i:i),i=1,1025)/1025*'?'/
because f95 section 5.2.10 R536 and f2003 section 5.2.5 R528 both say
data-i-do-object is array-element
or scalar-structure-component
or data-implied-do
Three f95 compilers (NAG, Sun, g95) agree with me, but was there a good
reason for J3 to allow a substring in a data-implied-do only if it's a
structure component?
a constraint
"C560 (R528) The scalar-structure-component shall contain at least one
part-ref that contains a subscript-list."
I'd have to look more, but I'd think that makes your last example
wrong, since there's no subscript list. When you tried this, did
you have all of the non-standard warnings enabled?
C560 and the R528 refer to? LS
.
- Follow-Ups:
- Re: Substring in DATA implied-do
- From: Richard Maine
- Re: Substring in DATA implied-do
- References:
- Substring in DATA implied-do
- From: John Harper
- Re: Substring in DATA implied-do
- From: Dick Hendrickson
- Substring in DATA implied-do
- Prev by Date: Re: common from fortran77 to fortran 90
- Next by Date: Re: I need some guideance regarding parallel processing
- Previous by thread: Re: Substring in DATA implied-do
- Next by thread: Re: Substring in DATA implied-do
- Index(es):
Relevant Pages
|