A
Antoine Leca
It appears a number of posters in comp.lang.c did miss my idea. I am sorry
to answer my own post, but this appears to me as the most simple solution to
avoid more useless posts.
This means that the answers only went to comp.std.c, they did NOT go to
comp.lang.c. I am sorry I took fro granted this was known.
This message is NOT redirected, so the answers will be shown on both groups.
This is the question ('reasonning') I asked, and I did not see the answer
for it yet. But please keep reading before hitting the "Respond" button...
In other words, I made perfectly (?) clear I knew 0 is an octal constant,
which happens to be one of the 3 forms of integer constants. My point is,
the important fact here is that 0 is a constant of value 0. Not the way it
is written.
By the way:
"a single digit less than 8 is octal, by definition."
Well, yes, but what does it buy here? An octal constant begins with a 0,
followed by any number (including none) of octal digits. Here, there are
none.
If the original question does not appear clear, here is another way to ask
it:
What is different if we are reasonning on:
if( a == 0x0 )
NOW you can press the Respond button.
Antoine
to answer my own post, but this appears to me as the most simple solution to
avoid more useless posts.
[fu2 comp.std.c only]
This means that the answers only went to comp.std.c, they did NOT go to
comp.lang.c. I am sorry I took fro granted this was known.
This message is NOT redirected, so the answers will be shown on both groups.
The type of the octal signed int literal 0 [...]
Sorry to nit-pick: what is the reasonning to add "octal" above?
This is the question ('reasonning') I asked, and I did not see the answer
for it yet. But please keep reading before hitting the "Respond" button...
I said:(I will not argue that 0 is not an octal constant, it is,
In other words, I made perfectly (?) clear I knew 0 is an octal constant,
which happens to be one of the 3 forms of integer constants. My point is,
the important fact here is that 0 is a constant of value 0. Not the way it
is written.
By the way:
"a single digit less than 8 is octal, by definition."
Well, yes, but what does it buy here? An octal constant begins with a 0,
followed by any number (including none) of octal digits. Here, there are
none.
If the original question does not appear clear, here is another way to ask
it:
if (a == 0)
...where a is any scalar type, the following will occur.
The type of the octal signed int literal 0 will be compared to the
type of 'a'.
What is different if we are reasonning on:
if( a == 0x0 )
NOW you can press the Respond button.
Antoine