C language book recommendations
rpjday at ccu.umanitoba.ca
rpjday at ccu.umanitoba.ca
Sat May 25 05:24:04 AEST 1991
In article <741 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>rpjday at ccu.umanitoba.ca writes:
>
>>>> C: A Reference Manual 3rd Edition
>>>> Samuel P Harbison & Guy L Steele Jr
>>>> Prentice Hall
>
>>Even the occasional annoying typo doesn't detract much.
>>What typo? Glad you asked.
>
>>On [page 94], in a table showing the legalities of
>>various declarations in various models, we read that
>
>>extern int x = 0 ;
>
>>in the omitted storage class model is treated as a reference.
>>However, according to the explanation on p. 93, this should
>>be illegal. Comments?
>
>Look over the material again. In their book, H&S are not presenting only
>ANSI C. They are trying to cover the range of C implementations which have
>been at all widely used. If you have to write code for a variety of C
>implementations, or understand some moldy old code written for some
>system you do not have access to, this book will help. It explains all
>the common things which have been done, and how you can get your code
>to work.
>
>As to your specific example, it is clearly marked in the table as
>"illegal" for typical C implementations, and "Don't use" under
>the "recommendation" column.
>--
>
>Steve Clamage, TauMetric Corp, steve at taumet.com
I don't have my 3rd ed. of H&S here, so I may very well
embarrass myself, but I think I checked out that section
thoroughly enough to remember what it says. I am aware that
H&S are showing various compiler models. They also quite
CLEARLY say that one of them, the omitted storage class
model, is what ANSI C uses. Their definition of this model
is what I have given above. On the next page, they also
CLEARLY say that "extern int x = 0;" is not, as you claim,
illegal, but that it is to be treated as a reference --
that is, a referencing declaration.
What H&S recommend is irrelevant. My concern is with the
entry in the table. Comments?
R. Day
More information about the Comp.lang.c
mailing list