Fwd: What is proper use of `break labelid`?

Fred Eisele <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAJGQK3O=viD80FAqz6Uuuu28GBV0RG1ujphDx8bpS7rjENp+ow@mail.gmail.com>
Thanks for the clarification.
The following is a sample to illustrate your points.
(sorry about the previous premature incomplete post)

```groovy
for (int x=1;x<7;x++) {
  println "x = $x"
  before: do {
    println('before')
  } while(false)

  println('between_1')
  during: do {
     println('during')
     switch(x) {
       //case 1: break before
       case 2: break during
       //case 3: break after
       //case 4: continue before
       //case 5: continue during
       //case 6: continue after
     }
  } while (false)

  println('between_2')
  after: do {
     println('after')
  } while (false)
}
```
Which is roughly the same as the following psuedo groovy (scopes and blocks
replaced with goto).
```psuedo_groovy
for (int x=1;x<7;x++) {
  println "x = $x"
  before_continue:
    println('before')
  before_break:

  println('between_1')
  during_continue:
     println('during')
     switch(x) {
       //case 1: goto before_break
       case 2: goto during_break
       //case 3: goto after_break
       //case 4: goto before_continue
       //case 5: goto during_continue
       //case 6: goto after_continue
     }
  during_break:

  println('between_2')
  after_continue:
     println('after')
  after_break:
}
```
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.