Alf P. Steinbach a écrit :
If you're interested in that then there are FAQs (including the
alt.comp.lang.learn.c-c++ FAQ), web-sites and more dedicated to the
stumbling ways of Schildt -- it seems that you have made no effort at
all!
There's no shortage of facts and examples.
Now it's human to err, but it's super-human to err so consistently and
so often as Shildt, and to present it in so convincing a way -- he's a
/good/ writer.
Look, I went there, and I landed in
http://www.lysator.liu.se/c/schildt.html
There, I can read:
<quote>
3.14
## An object is either a variable or a constant that resides at a
## physical memory address.
In C, a constant does not reside in memory, (except for some string
literals) and so is not an object.
<end quote>
This is completely wrong. Outside some constants that are inlined by the
compiler because the processor supports inlined constants, all other
constants are just like a character string.
For instance in a x86 implementation:
double a = 12.345;
The double constant 12.345 will reside in memory. The same for long
double constants, for structures initialized by constants,
for 64 bit constants, etc etc.
The only constants that are initialized inline are the inlined constants
accepted inline by the processor (in the code stream)
Conclusion:
Schild is right and Mr Feather (that I respect of course) is wrong.
Mainly the other criticism are matters of style, where Mr Feather
differs from Mr Schildt. He would have more explained about the
standard, more precise stuff, etc.
For instance Schildt says:
this limits the total character set to 255 characters.
and Feather criticises:
Actually, it limits it to UCHAR_MAX characters, which is at least 255,
but can be more.
Great. Obviously Feather is pedantically right, but is it very important?
Maybe. This is a matter of style, and doesn't justify the attacks
that are given here.