In Msp430f5529.h I see (57 * 1u). I presume "1u" means unsigned integer? Which doc describes this?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
In Msp430f5529.h I see (57 * 1u). I presume "1u" means unsigned integer? Which doc describes this?
This is ANSI C. It is described in ISO/IEC 9899:2011, Section 6.4.4 "Constants". In short the suffix can be:
well, (57u) would have done the same. I guess it was split this way for readability. Since it is a constant value, the compiler will resolve it at compiletime, so it makes no difference (even though it might make the compile process a tad slower).460822 said:It's interesting that a number can be defined as an "unsigned int" this way.
Every number, unless specified differently, is treated as signed int.460822 said:What is the nomenclature for int, char, and unsigned char?
**Attention** This is a public forum