(j3.2006) Label DO statement
Cohen Malcolm
malcolm
Wed Mar 29 20:50:35 EDT 2017
<<<
B.3.10 of 17-007r1 [546:10-12]. Says
"The label in the DO statement is redundant with the construct name.
Furthermore, the label allows unrestricted branches and, for its main
purpose (the target of a conditional branch to skip the rest of the
current iteration), is redundant with the CYCLE statement, which is
clearer."
With the deletion of the nonblock DO, is it still correct to say that
the label allows unrestricted branches?
>>>
The deletion of nonblock DO has no bearing on this paragraph.
<<<
[191:37] says "It is permissible
to branch to an end-do only from within its DO construct."
>>>
It has always (well, since F77) been the case that you can only branch to a
DO loop label from within the DO. There is no change here.
This description "unrestricted branches" has always been slightly
hyperbolic:
(1) apart from the F66 extended range of the DO loop, which was deleted in
Fortran 77, it has always been forbidden to branch into a construct;
(2) it has always been forbidden to branch to a label in another procedure.
I don't think it is unreasonable to describe branches "unrestricted" even
though they must necessarily follow the restrictions that all branches have.
Cheers,
--
.............Malcolm Cohen, NAG Oxford/Tokyo.
More information about the J3
mailing list