Is there ANY chance we can fix the bitwise operator precedence rules?
Adam Ruppe
destructionator at gmail.com
Tue Jun 22 06:17:57 PDT 2010
What you guys are saying makes enough sense. switch will always be a
series of labels and jumps in my mind, but I can deal with this.
One note that I think is the main reason people find fallthrough
confusing: they hit tab once too many times.
switch(a) {
case 10:
case 20: // obvious fallthrough, no break directly above it
break; // obvious break - same indentation as the case, just like
braces would be
case 30:
}
I notice a lot of other people indent the break further than the case,
which is something I only do if the break is not the last statement
(which means it is probably indented twice, being inside an if or
something.)
Oh well.
More information about the Digitalmars-d
mailing list