Yes. This is useful if you have a loop nested inside another loop and you want to continue the outer loop. Here is a page about MDC about it. So, in your case, in cycle i = 2 , if you say continue nextLoop from cycle j , it will jump out of cycle j , increment i and continue with i = 3 .
Using continue with shortcuts is usually not a good practice; this may indicate a need for reorganization of logic. But it acts perfectly syntactically, and I expect someone to ring with an example situation where they feel this is absolutely necessary.
Change Responding to your editing, nextLoop loop label (name) (without a colon): you can mark statements, and then use these labels as continue and break targets. See the specification for more details. A typical use is the label method in your example as well as continue or break , but note that break also applies to nested switch - you can mark them as loops and break them into an external one from one of the internal cases. You can even mix them so you can break the loop inside the switch (the label namespace is common to both).
source share