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

initialize variable with binary value?

hi all
it may seem very easy but i can't initialize
my code constants with binary value in c51
ver 3.20 franklin DOS version i want to:
code char bin_code[3]={
0b1100110011,0b1111110011,0b1100111011};

but compiler doasn't accept.
any one can help me?

Parents
  • "but compiler doesn't accept."

    Does the Manual say that it should?

    Have you ever seen it mentioned in K&R, or any other 'C' text book?

    Of course not - it's just not part of the 'C' language.
    Sorry, but you'll just have to stick to Hex, Octal, or decimal! :-(

    It certainly has been discussed here before, and various macro solutions have been suggested - hit that 'Search' button!

Reply
  • "but compiler doesn't accept."

    Does the Manual say that it should?

    Have you ever seen it mentioned in K&R, or any other 'C' text book?

    Of course not - it's just not part of the 'C' language.
    Sorry, but you'll just have to stick to Hex, Octal, or decimal! :-(

    It certainly has been discussed here before, and various macro solutions have been suggested - hit that 'Search' button!

Children
No data