Delay Routine: Fully-portable C89 if possible

Oct 09, 2007 100 Replies

The "sint16_t" was a typo - it should of course be "int16_t".

For a C99 compiler, "int16_t" is *not* optional unless there are no

16-bit integer types available on the implementation. Thus int16_t is standard and portable on modern compilers (many non-C99 compilers provide "cheap" C99 features, such as // comments and ).

You are perfectly correct in saying that a compiler whose "int" is less that 16-bit does not implement the C language correctly (never mind any of the standards). However, the fact remains that in the embedded market there are "C" compilers that target 8-bit cpus, have 8-bit ints (at least as an option), and are useful and productive tools despite not technically being "C".

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required