Hi folks,
I believe that the explanation on this question is misleading. It states: "Because break JILL; would be valid only if JILL is labelling a loop or a block. In this case, there is no loop/block for break JILL; to break."
Well, it is legal to put a label on a "simple" statement, however meaningless, so this should not be a factor in consideration. One cannot break a label unless he is inside that label's statement, and this seems to be the problem in this question.
In fact, { mylabel: break mylabel; } works on my machine. And so does { mylabel: if (a > b) break mylabel; }
About Question enthuware.ocajp.i.v7.2.1057 :
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1057 :
You are right but I think that is what the explanation tries to convey as well. It says "because break JILL; would be valid if...", put differently, it says break JILL is invalid in the present situation because JILL does not label a block that can be broken out of.
The explanation has now been updated to make it more clear.
thank you for your feedback!!
The explanation has now been updated to make it more clear.
thank you for your feedback!!
Who is online
Users browsing this forum: No registered users and 2 guests