(j3.2006) statement labels and scope

Van Snyder Van.Snyder
Thu Jan 14 16:46:23 EST 2016


If I remember the discussion about "scope" and "inclusive scope," labels
of format statements concerned us more than branch targets.

On Thu, 2016-01-14 at 21:40 +0000, Bill Long wrote:
> On Jan 14, 2016, at 3:09 PM, Lionel, Steve <steve.lionel at intel.com> wrote:
> 
> > Um, what about:
> > 
> > subroutine sub
> > 
> > block
> > go to 10
> > 10 continue
> > end block
> > 
> > 10 continue
> > end subroutine sub
> 
> 
> I?d argue that the text for labels would say the branch is to the
> continue statement inside the block.  As if the statements inside the
> BLOCK construct were, instead, in a contained internal procedure. 
> 
> > 
> > The text for GO TO says "inclusive scope?.
> 
> 
> Point taken.  Making the rules for labels and GOTO (the primary user
> of labels)  consistent would be less confusing.  (Although any code
> using GOTO statements is already headed down the ?confusing? path.)
> 
> The advantage of the current wording for labels is that you can insert
> statement labels inside a block without having to look at the code in
> the surrounding scope to search for label conflicts.  Only if you want
> to branch to a statement outside the block construct would you have to
> be careful to not use that label on a statement inside the block as
> well. 
> 
> The main question is whether the text in 3.2.5p2 needs a change, and
> if it does, is an incompatibility notice also needed?
> 
> Cheers,
> Bill
> 
> 
> > 
> > Steve
> > _______________________________________________
> > 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
> 
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3





More information about the J3 mailing list