About Question enthuware.ocajp.i.v7.2.1057 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ETS User

About Question enthuware.ocajp.i.v7.2.1057 :

Post by ETS User »

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; }

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1057 :

Post by admin »

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!!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests