Re: uniqueness of {if,do,case}-construct-name
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Sat, 30 Apr 2005 16:12:20 +0000 (UTC)
In article <vNadnRaP7PZis-7fRVn-vw@xxxxxxxxxxx>,
"James Van Buskirk" <not_valid@xxxxxxxxxxx> writes:
> "Steven G. Kargl" <kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:d4v9pv$1sk$1@xxxxxxxxxxxxxxxxxxxxxxxxxx
>
>> I'd be interesting in your reasoning. AFAICT, the construct-name
>> is local to the construct. For example, a EXIT or CYCLE in the 2nd
>> loop of the example code that I posted will not branch to the
>> end of the first loop.
>
> You seem not to have noticed that Richard likes to use construct
> names even when they aren't necessary, just so that he can tell
> at a glance which control statements go with which construct.
> Definitely a step in the direction towards self-documentation,
> and I know from experience just how hard it can be to spot an
> error caused by thinking a control statement refers to a
> different construct than it actually does. Allowing multiple
> constructs to have the same name erodes the effectiveness of
> this self-checking feature.
I agree with this position. However, my question was prompted
by a situation where I cut-n-pasted a DO loop in one of my codes
without noticing the do-construct-name. Gfortran compiled the
code and the program executed as expected. I moved the code to
a system with NAG's compiler and it flagged the use of the
do-construct-name on the 2nd loop as an error. As someone who
actively contributes to fixing gfortran, this "failure" may be
within my abilities to fix. I'm simplying trying to establish
whether the code I originally posted conforms to the standard,
which I the moment I believe does.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- References:
- uniqueness of {if,do,case}-construct-name
- From: Steven G. Kargl
- Re: uniqueness of {if,do,case}-construct-name
- From: Richard E Maine
- Re: uniqueness of {if,do,case}-construct-name
- From: Steven G. Kargl
- Re: uniqueness of {if,do,case}-construct-name
- From: James Van Buskirk
- uniqueness of {if,do,case}-construct-name
- Prev by Date: Re: uniqueness of {if,do,case}-construct-name
- Next by Date: Re: why doesn't this compile ?
- Previous by thread: Re: uniqueness of {if,do,case}-construct-name
- Next by thread: Re: uniqueness of {if,do,case}-construct-name
- Index(es):
Relevant Pages
|