G
Guest
Xenos said:Yes, I know, same as Ada's exit statement. So what?
Just to relax ourself with an OT...
- Dario
Xenos said:Yes, I know, same as Ada's exit statement. So what?
So what's your point?
An explicit break construct would be slightly
nicer for readability, but it needs to identify which loop it's
breaking from, so it needs some kind of label.
I disagree that the former method has anything to do with the control
structure, but I won't argue the point.
Not necessarily. I would look at the particular situation. Most likelyI will simply ask if you would use
this same method for an Nth dimensional loop, where N is any positive
integer. Sure, nested loops 3 or more deep are rare (and probably in most
cases bad), but would you really argue the "if (flag) break;" mechanism is
better to break out of several levels of scope, simply to avoid a single
goto?
I didn't mean the break statements. I meant the flag and the if statementAlan Balmer said:On Tue, 15 Jun 2004 12:53:43 -0400, "Xenos"
I don't really see any room for disagreement, unless you interpret the
statement much differently than I intended it. Leaving the "for"
control structure is precisely what the "break" does. The goto has no
such relation to the "for" structure. Perhaps I phrased it badly.
those said:in comp.lang.c i read:
then why post it?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.