Re: Tabs v.s. spaces
(This is waaay off-topic but what the heck, I'll keep going...)
On Wed, Nov 19, 2003 at 08:08:51AM -0800, Steve Lamb wrote:
| Cameron Patrick wrote:
| >Nope, no fall-through in that one, so it doesn't help. It /is/ nifty
| >though :-)
|
| Uh, there was a fall through there. Notice that if x has a value that
| isn't in the dictionary the if will fall through to the else.
I meant fall through in the sense that
switch(foo) {
case 1:
blah(); /* no "break;" */
case 2:
blurgh();
}
will run blurgh() if foo==1 or foo==2.
The original poster was talking about Duff's device:
http://www.lysator.liu.se/c/duffs-device.html
which relies on this (and other foul properties of C's switch/case) to
unroll a loop.
Cameron.
Reply to: