On 2/11/11, Christopher Nicholson-Sauls <ibisbase...@gmail.com> wrote:
>
> Even better:
>
> switch( funcall() ) {
>     case "foo", "bar", "foobar", "barfoo": {
>         // complex code
>         break;
>     }
>
>     case "blue", "green": {
>         // complex code
>         break;
>     }
>
>     default:
>         // do nothing -- i like to comment defaults
> }
>
> Also often forgotten, that 'case' clauses take an argument list, not
> just an expression.  And yeah, in this case at least... it still fits in
> 80 columns.  (I prefer 90 myself, but it's moot.)
>
> -- Chris N-S
>

Damn I didn't know that! Thanks.

Reply via email to