Re: GoTo in Java



On Fri, 20 Jan 2006 11:36:57 -0800, "Chuck Stevens"
<charles.stevens@xxxxxxxxxx> wrote:

>I agree, you didn't advocate it; others seem to be of the opinion that it'd
>be a worthwhile addition, and my response to that is that I think it's a Bad
>Idea (and not merely Not a Good Idea). There's noplace to put the label in
>the syntax of an inline PERFORM without simultaneously introducing semantic
>and/or syntactic ambiguities.

The syntax would have to be changed.

Example

LABEL INNER PERFORM UNTIL IS-TRUE
LABEL MIDDLE PERFORM UNTIL X = 3
PERFORM UNTIL MY-EOF
PERFORM OUTSIDE-PARAGRAPH
IF FOUND-IT EXIT MIDDLE
END-IF
END-PERFORM
END-PERFORM
END-PERFORM.


Other constructions would need to be considered if this functionality
was to be added to the language for instance, if we had that, this
should be optional:

LABEL INNER PERFORM UNTIL IS-TRUE
LABEL MIDDLE PERFORM UNTIL X = 3
PERFORM UNTIL MY-EOF
PERFORM OUTSIDE-PARAGRAPH
IF FOUND-IT EXIT MIDDLE
END-IF
END-PERFORM
END-PERFORM MIDDLE
END-PERFORM INNER

.