void classify(char c) { write("You passed "); switch (c) { case '#': writeln("a hash sign."); break; case '0': .. case '9': writeln("a digit."); break; case 'A': .. case 'Z': case 'a' .. case 'z': writeln("an ASCII character."); break; case '.', ',', ':', ';', '!', '?': writeln("a punctuation mark."); break; default: writeln("quite a character!"); break; } } The code fails to compile. If I change the line: case 'A': .. case 'Z': case 'a' .. case 'z': to: case 'A': .. case 'Z': then it compiles.
> case 'A': .. case 'Z': case 'a' .. case 'z': I'd say you have simply forgotten the colon after 'a'. With > case 'A': .. case 'Z': case 'a': .. case 'z': it compiles.
(In reply to comment #1) > > case 'A': .. case 'Z': case 'a' .. case 'z': > > I'd say you have simply forgotten the colon after 'a'. With > > > case 'A': .. case 'Z': case 'a': .. case 'z': > > it compiles. Ouch. This is rather ironic in wake of the fact that I preached the helpfulness of that ':'. Thanks, and apologies to everyone for the distraction.