Should I buy the C reference manual or the standard ?

S

spibou

I believe I have a good working knowledge of C but now
I want to reach a point where I understand all the dirty
little details. For example I understand what a "natural"
macro will expand to but there are all kinds of contrived
examples where I wouldn't be sure. So I want to reach
a point where I won't have these dark areas in my understanding.
So the question is which book is the most appropriate for
achieving such a goal , the C reference manual by Harbison
and Steele or the Standard ?

Speaking of the standard what do you think of the following
edition ?
http://www.amazon.co.uk/gp/product/0470845732/202-3401591-7887013?v=glance&n=266239

Cheers
Spiros Bousbouras
 
M

Malcolm

I believe I have a good working knowledge of C but now
I want to reach a point where I understand all the dirty
little details. For example I understand what a "natural"
macro will expand to but there are all kinds of contrived
examples where I wouldn't be sure. So I want to reach
a point where I won't have these dark areas in my understanding.
Why? If it isn't obvious what a macro will do, what makes you think that the
programmer who has to read your code, and might not use C very often, will
be able to understnad it?
 
S

spibou

Malcolm said:
Why? If it isn't obvious what a macro will do, what makes you think that the
programmer who has to read your code, and might not use C very often, will
be able to understnad it?

Nothing at all. Understanding all the dirty little details is a goal in
its own right ; I'm not necessarily planning on basing my programmes on
those details. I just like to understand things completely. But of
course
there's always the possibility that I'll have to understand someone
else's
obfuscated code.

When it comes to macros in particular I don't even have in mind
necessarily
macros which expand to compilable code. See the thread "Is the output
of the
preprocessor deterministic ?" for more details.
http://groups.google.co.uk/group/comp.lang.c/browse_thread/thread/d090a850551df881/2782b1d30c41a2d3
 
K

Keith Thompson

I believe I have a good working knowledge of C but now
I want to reach a point where I understand all the dirty
little details. For example I understand what a "natural"
macro will expand to but there are all kinds of contrived
examples where I wouldn't be sure. So I want to reach
a point where I won't have these dark areas in my understanding.
So the question is which book is the most appropriate for
achieving such a goal , the C reference manual by Harbison
and Steele or the Standard ?
[...]

I have both myself, and I recommend it if you're serious about
understanding the dark nooks and crannies of the language.

I paid $18 for my PDF copy of the C99 standard, but n1124.pdf (which
includes the C99 standard plus TC1 and TC2) is free, and it's what I
usually use as a reference.
Speaking of the standard what do you think of the following
edition ?
http://www.amazon.co.uk/gp/product/0470845732/202-3401591-7887013?v=glance&n=266239

I haven't seen it, but it looks like a good deal. (It's a bound copy
of the C99 standard and rationale; Amazon wants about 23 UK pounds for
it.) But if you don't mind working with PDF, you might find a soft
copy more convenient; I do, but YMMV.

It could also be useful to have a good copy of the C90 standard.
 
S

spibou

Keith said:
So the question is which book is the most appropriate for
achieving such a goal , the C reference manual by Harbison
and Steele or the Standard ?
[...]

I have both myself, and I recommend it if you're serious about
understanding the dark nooks and crannies of the language.

I paid $18 for my PDF copy of the C99 standard, but n1124.pdf (which
includes the C99 standard plus TC1 and TC2) is free, and it's what I
usually use as a reference.

I already have n1124.pdf but is it reliable enough ? I remember reading
here that there are important differences between the draft and the
actual standard.
 
K

Keith Thompson

Keith said:
So the question is which book is the most appropriate for
achieving such a goal , the C reference manual by Harbison
and Steele or the Standard ?
[...]

I have both myself, and I recommend it if you're serious about
understanding the dark nooks and crannies of the language.

I paid $18 for my PDF copy of the C99 standard, but n1124.pdf (which
includes the C99 standard plus TC1 and TC2) is free, and it's what I
usually use as a reference.

I already have n1124.pdf but is it reliable enough ? I remember reading
here that there are important differences between the draft and the
actual standard.

n1124 was published *after* the standard (unlike n869, which was a
pre-standard draft). It incorporates the official C99 standard plus
the changes specified by TC1 and TC2. All differences from the
standard are marked with change bars. (Where TC1 or TC2 changed
something, n1124 doesn't have the original C99 wording.)

I still think the C99 standard was well worth the $18 I paid for it,
but I use n1124 more often.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top