On Sat, 27 Jun 2009 10:22:32 -0300, Gerhard Fiedler wrote:
> This is not quite right. A 'break' will break out of the enclosing
> 'switch' statement, not only the current 'case' of it. Using it at the
> end of the 'case' to exit the 'switch' (not the current 'case') is
> actually probably the most common use for 'break':
Hmmm...an interesting point, but I'm not entirely sure what the semantic
difference in your statement would be when compared to my original wording.
Sounds like two different ways of saying the same thing.
After a 'break' there will be no other 'case' executed in the same 'switch'
block, so the current 'case' has ended - which by definition implies the
'switch' has ended also (since you cannot have code inside the 'switch' that
is not attached to a 'case', default or otherwise). Am I missing something
here...? Something subtle perhaps ?
Regards,
Pete Restall
(might also be an idea to move this to [TECH] or [OT] if this is going to
spark a longer thread)
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist