(j3.2006) statement labels and scope
Bill Long
longb
Thu Jan 14 18:47:10 EST 2016
On Jan 14, 2016, at 5:19 PM, Robert Corbett <robert.corbett at oracle.com> wrote:
> On 01/14/16 12:56, Bill Long wrote:
>> In 3.2.5 Statement labels we say that a statement label shall not be given to more than one statement ?in its scope?. Since BLOCK constructs are scopes, if this is taken as stated, the following
>>
>> subroutine sub
>> 10 continue
>>
>> block
>> 10 continue
>> end block
>>
>> end subroutine sub
>>
>> should be conforming. In, instead, we actually meant ?inclusive scope?, then it would not be. Personally, I think that allowing this is preferred, and would not require a wording change. But I?m checking because I see inconsistent behavior with different compilers. (And this is in one of my clauses to read this time).
>
> We did mean inclusive scope. The section on scopes makes this clear.
>
> Subclause 16.1 of 10-007r states
>
> The scope of ... a local identifier is its inclusive scope.
>
> Subclause 16.3.1 says that statement labels are local identifiers.
unless they are construct entities.
> Subclause 16.4 does not say that statement labels can be statement
> or construct entities.
So, we conclude that either 3.2.5 or 16.4 is wrong.
Note, unrelated, for the group reading 16: It looks like SELECT RANK got overlooked in several places in 16.4.
Cheers,
Bill
>
> Bob Corbett
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3
mailing list