towards a faster isdigit()
Doug Gwyn
gwyn at smoke.brl.mil
Sat May 11 08:33:16 AEST 1991
In article <1991May8.154453.4462 at intellistor.com> wicklund at intellistor.com (Tom Wicklund) writes:
>1) Numeric digits aren't adjacent character codes in all character
>sets (though I can't think of an example where this isn't true off
>hand).
Oh, yes they are, at least in terms of the C source character set,
because that is a requirement the standard imposes on a conforming
implementation. (I argues and voted against that, by the way.)
>2) The (unsigned) cast may not work (I think an implementation could
>return abs(x) as the result of an (unsigned) cast but am not sure),
Type conversions are carefully specified in the C standard; what you
describe is not allowed in a conforming implementation.
More information about the Comp.lang.c
mailing list