Thread: binary in C
View Single Post
  #5   Spotlight this post!  
Unread 11-11-2005, 20:07
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
Re: binary in C

Quote:
Originally Posted by K&R, page 37
"The value of an integer can be specified in octal or hexadecimal instead of decimal. A leading 0 (zero) on an integer constant means octal; a leading 0x or 0X means hexadecimal".
So apparently you can't, unless the C18 compiler is different in that aspect (it isn't a 100% ANSI C, after all) - assuming you are asking this about the Microchip compiler.
I agree with Dave that the hexadecimal form is much better once you get used to it.
You probably know it, but for the ones that do not, each hex symbol represents 4 bits. Once you realize that, it just isn't magic anymore.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383