(j3.2006) GOTO label - with label in BLOCK and in inclusive scope

Malcolm Cohen malcolm
Thu Aug 18 20:04:18 EDT 2011


Tobias Burnus writes:
>I was wondering whether the following program is valid

No it is not.

>The programs seems to be valid as the following is fulfilled:
>
>"The same statement label shall not be given to more than one statement in its 
>scope." (F2008, "3.2.5 Statement labels")

The scope of a label is an inclusive scope.  The very text you quoted tells us 
that the inclusive scope includes both of those statements so you have not 
obeyed the rules.

Quoted for emphasis:
>NOTE 1.5
>That is, inclusive scope is the scope as if BLOCK constructs were not scoping 
>units."
>
>Thus, also the GOTO seems to be valid.
!!!

No, that makes it invalid.

We carefully worded this not to say scoping unit but scope precisely to get this 
effect!

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list