Re: label-do can't end on a continue statement?





Joe Krahn wrote:

Having read through the F2003 stuff, here's one more syntax question. Although a non-label DO is the right way now days, I was surprised to see the rule that the labeled do-termination statement for a label-do is NOT allowed to be a continue. I thought the 'nice' way was to always use a labeled continue statement so that (at least for people not experienced in Fortran) one does not need to know if the labeled statement is inside or outside of the DO loop.

Even more strange, the exclusion of ending on a CONTINUE statement does not apply to shared do-terminators for nested DO loops.

Is this just more historical nonsense? (Or, maybe people were nodding off from boredom of endless trivial details when this was written.)

Joe

That's a confusing part of the standard (unlike the rest of
it ;-( ).

For Fortran 90 the DO loop text was split into two sections:
1) The new way where multiple DO's can NOT end on a single
terminator.
2) The old way where multiple DO's CAN on a single
terminator.

I think everything is still in there. It's just that
labeled continues are described by the nonblock do syntax
rules.

*** Hendrickson

.