A
Anand
ITYM '\x' not '/x'Irrwahn said:Keith Thompson said:<OT purpose="academic-intrests|curiosity" nonsensical="99.99999%">
Did you preffer the word *octal* instead of *"integer-value-constant"*
because of the fact that it starts with 0?
[ I know 0 is same in bin, oct, dec ,hex etc..]
So does the compiler would start off processing the token as octal the
moment it starts off with 0?
</OT>
Yes (and no, it's not really off-topic).
The grammar for the various kinds of integer constants, octal,
decimal, and hexadecimal, makes it clear that an octal constant always
starts with '0', a decimal constant always starts with a non-zero
digit, and a hexadecimal constant always starts with "0x" or "0X".
0 is an octal constant.
Just to add, that the hexadecimal escape sequence notation for
character constants is '/xHEXDIGITS'.
Best regards