<html>
<body>
Hi Bruce,<br><br>
I particularly like definition 4 there: 'To pray for deliverance from'.
Maybe we can deprecate global warming, but that's another story.<br><br>
It's page 55 in my copy (K&amp;R 1st Ed. c1978), but it also says on
p56:<br><br>
&quot;... Falling through from one case to another is not robust, being
prone to disintegration when the program is modified.&quot;<br><br>
I've been there and done that. However I have also made use of the
following construct:<br><br>
<font face="Courier New, Courier">&nbsp; case 1:<br>
&nbsp;&nbsp;&nbsp; do_a_case1_only_action();<br><br>
&nbsp; case 2:<br>
&nbsp;&nbsp;&nbsp; do_a_case1_and_2_action();<br>
&nbsp;&nbsp;&nbsp; break;<br><br>
</font>which is great when you write it, but a real pig when you come
back to it some months later and think WTF is that all about.<br><br>
New versions of existing compilers must not break existing code by
rejecting multiple case entries, however newer compilers (such as C#) are
very specific about 'switch(){}'. Each 'case x:' must be single entry and
must have a 'break;' and there must be a 'default:' with a 'break;' even
if it's empty. To my mind, that's probably a good discipline to adopt.
Even though it does lead to a certain amount of code bloat, it is totally
portable.<br><br>
All the best for now,<br>
John<br><br>
<br>
At 17:48 09/03/2007, you wrote:<br>
<blockquote type=cite class=cite cite="">John Baraclough wrote:<br><br>
.<br>
.<br>
.<br>
<blockquote type=cite class=cite cite="">You should be aware that
multiple entry case statements are now deprecated (isn't that a wonderful
word). They should not generate an error, but may well be
non-portable.</blockquote>.<br>
.<br>
.<br>
&nbsp;
<a href="http://dictionary.reference.com/browse/deprecate" eudora="autourl">
http://dictionary.reference.com/browse/deprecate</a><br><br>
Why? The Bible (K&amp;R 2nd Ed.) pg 58 states:<br><br>
&nbsp; &quot;Each case is labeled by one or more integer-valued constants
or constant expressions. ...&quot;<br><br>
If you change the rules now, you'll be breaking a lot of existing
code.<br><br>
Bruce<br><br>
<br>
_______________________________________________<br>
Icc-avr mailing list<br>
Icc-avr@imagecraft.com<br>
<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" eudora="autourl">
http://dragonsgate.net/mailman/listinfo/icc-avr</a><br><br>
</blockquote></body>
</html>