How do I declare a "binary" variable ?
i.e. for hex is 0xABCD it compiles fine
but for binary 0b101010 it does not work <-- ??
any suggestions will be appreciated
Thank you
Fausto
ANSI C does not support binary values.
There is a solution suggested in the comments of this thread:
Coding a binary data
Ronan Synnott said:ANSI C does not support binary values
It does now - C23 (at long last) adds support for binary literals:
https://www.linkedin.com/pulse/major-revisions-5th-edition-c-c23-robert-seacord-stu0e/#:~:text=%E2%80%94%20binary%20integer%20literals
Fausto Bartra - but Keil C51 supports only the C90 standard:
https://developer.arm.com/documentation/101655/0961/Cx51-User-s-Guide/Appendix/A--ANSI-C-Implementation