ja*********@verizon.net writes:
Tomás Ó hÉilidhe wrote:
...
>You might be wise to go with types such as "int_fastest_atleast_8" (I
don't know if that's its exact name).
There's an int_fast8_t which is the fastest type with at least 8 bits,
and there's int_least8_t, which is the smallest type with at least 8
bits.
Both of which are defined in <stdint.h>, which is a new header in C99.
Not all implementations provide it.
int_least8_t is pretty much guaranteed to be signed char, or perhaps
plain char if plain char is signed. (It *might* be something else in
an implementation that provides extended integer types, but there's no
point in making it anything other than signed char or char.)
int_fast8_t will probably be either the same as int_least8_t, or
signed int. (I'm a little surprised to find that int_fast8_t is 8
bits under gcc on an x86 system.) But if you want fast computations
and you don't have <stdint.h>, int is likely to be your best bet.
--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Looking for software development work in the San Diego area.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"