4 ms·
That was indeed my intention. Remember we're hypothetically reinventing C from scratch so there's no legacy code to worry about. By making 0x literals of bitwi
by billpg 7y ago
That was indeed my intention. Remember we're hypothetically reinventing C from scratch so there's no legacy code to worry about.
By making 0x literals of bitwise type, they can only be used with bitwise operators. Decimal literals are regular integers so can only use arithmetic operators.
If you want to use a hexadecimal value with arithmetic operators or decimal values with bitwise operators, use the operator that converts one type to another.