[SOLVED] "u" postfix in the MSP430 Microcontroller.

Status
Not open for further replies.

vinothmct

Member level 1
Joined
May 2, 2012
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,584
What does representation in 0*0x100u mean in C . If it end with "b" . I know its binary . What is "u"
 

Are you using TI's code composer studio? I didn't know you could do that in it.

The 'u' at the end will be specifying that the literal value (0x100) is to be stored as an unsigned integer. I have seen that use in C# programming.

It is the 0x preceding the literal value that specifies hexadecimal, 0b preceding it would indicate binary (as 0b100, or possibly 0b100u to also indicate unsigned int).

See here http://www.blackwasp.co.uk/CSharpNumericLiterals.aspx
 


Yes in CCS only . MSP header files has such values . Yep it is unsigned hex value . Thanks for the reply
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…