From: Junio C Hamano Date: Sun, 18 Jun 2006 21:07:32 GMT Subject: Re: [PATCH 1/7] Remove ranges from switch statements. Message-ID: <7vveqyyxyj.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <1150643889264-git-send-email-octo@verplant.org> Florian Forster writes: > - switch (ch) { > - case '/': case '-': case '.': > - case 'A'...'Z': case 'a'...'z': case '0'...'9': > + if (((ch >= 'A') && (ch <= 'Z')) > + || ((ch >= 'a') && (ch <= 'z')) > + || ((ch >= '0') && (ch <= '9')) > + ... Sorry for bringing up an old topic again, but wouldn't people agree that this is easier to read if it were written this way ;-)? if ( (('A' <= ch) && (ch <= 'Z')) || (('a' <= ch) && (ch <= 'z')) || (('0' <= ch) && (ch <= '9')) ...