- Range membership:
while ('0' <= *cp && *cp <= '9')
- Case conversion:
if ('a' <= *s && *s <= 'z')
*s -= ('a' - 'A');
- Both examples above illustrate non-portable code.
- A more complex example:
i = 0;
while (*cp >= '0' && *cp <= '9')
i = i * 10 + *cp++ - '0';