What is proper use of `break labelid`?

Fred Eisele <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAJGQK3P3-suAe5hKf-UExwQmZtSHKpuwP60hyOZTEsZ5akNZeA@mail.gmail.com>
I am seeing some inconsistency in the documentation for use of breaking to
labels.

This indicates that groovy works similar to fortran, goto label.
https://groovy-lang.org/semantics.html#_labeled_statements

for (int j=0;j<i;j++) {
   println "j=$j"
   if (j == 5) { break exit }}exit: println "i=$i"


In other places it sounds more like java.
https://stackoverflow.com/questions/6126702/java-groovy-double-for-statement-question

outerLoop:for (...) {
    for (...) {
        if (...) {
            break outerLoop;
        }
    }
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.