I happened to be browsing through the ivtv driver tonight, and I came across a C operator that I had never seen before, the ellipses (...). Here's an example of it in use:
switch (val) {
case 0 ... 10 :
printf("Somewhere between 0 and 10.\n");
break;
case 11 ... 20:
printf("Somewhere between 11 and 20.\n");
break;
default:
printf("Big.\n");
}
I did a quick google, but didn't find anything about it. Does anybody
know what the deal is with this? Is this only usable with certain
versions of gcc? Does it apply in other ways besides case statements?
--
Topher Fischer
GnuPG Fingerprint: 3597 1B8D C7A5 C5AF 2E19 EFF5 2FC3 BE99 D123 6674
[EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature
/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
