Menu

binary numbers

2018-06-05
2018-06-06
  • stan cartwright

    stan cartwright - 2018-06-05

    Help says

        #define Test0 b'11111111'
        #define Test1 0b11111111
        #define Test2 0B11111111
    

    but HI2CSend(b'10001111') give error 2 unbalanced braces
    whereas HI2CSend(0b10001111) works ok

     
    • Anobium

      Anobium - 2018-06-05

      Known issue always use 0b10001111 format. The pre-processor treats the first quote as comment commencer.

      Always use 0b10001111 format.

       
      • Anobium

        Anobium - 2018-06-05

        I have revised the Help to remove this usage.

         
  • David Stephenson

    Will the b'11111111' form still be supported?

     
  • David Stephenson

    Will the b'11111111' form still be supported?

     
    • Anobium

      Anobium - 2018-06-06

      Of yes. b'11111111' form is still fully supported. You may get the error shown above if you encase within braces, so, in this case use the alternative.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.