This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code contains birnay number

I have a question on Uvsion2 IDE.
I read a Quick start manual on page 111.
It indicates that the compiler accepts
binary constant number. When I used it
on my code, the compiler did not seem to take
it. Could somebody tell me what I did
wrong here.


Here is the short test code:

char number;
main(void)
 {
  number = 111111y;   //binary number
 }

Parents
  • "Even more surprising is that I've never even seen any compiler come up with a proprietary extension to allow this - I've seem all sorts of other weird & wonderful extensions, but never binary notation."

    HI-TECH's compilers support binary notation in the form of a "0b" prefix, which is used like the "0x" hexadecimal prefix you are familiar with.

Reply
  • "Even more surprising is that I've never even seen any compiler come up with a proprietary extension to allow this - I've seem all sorts of other weird & wonderful extensions, but never binary notation."

    HI-TECH's compilers support binary notation in the form of a "0b" prefix, which is used like the "0x" hexadecimal prefix you are familiar with.

Children
No data