Menu

Weird things in parameter passing

sfyris
2023-08-04
2023-08-05
  • sfyris

    sfyris - 2023-08-04

    Hello friends. Look please at the following pictures. When I pass a 00 as parameter in i2csend as plain decimal number i have a compiler error. When i pass it as a hex 0x00 all is ok.

     

    Last edit: sfyris 2023-08-04
  • sfyris

    sfyris - 2023-08-04

    why? It shouldn't be. Like 12, 45, 123, 4323 etc, 00 it's only a number, it's zero, what's the difference when it is written 0x00 or 00 or 00000 or 0000000 etc.

     
    • Anobium

      Anobium - 2023-08-05

      The compiler has a set of rules. 00 is not valid.

      When the compiler has a set of rules. This is one of them.

       

Log in to post a comment.