Ansi C reference guide

Roger House roger at everexn.uucp
Sat Sep 8 04:58:37 AEST 1990


In <4BZPKKR at dri.com> alexande at dri.com (Mark Alexander) writes:

>In article <13697 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>>In article <12836 at netcom.UUCP> jim at netcom.UUCP (Jim Nelson) writes:
>>>Does anyone know of good books, jounals or other publications
>>>that describe the Ansi C standard in detail?
>>
>>The best one I have seen is "Standard C" by P.J. Plauger and Jim Brodie
>>(1989, Microsoft Press, ISBN 1-55615-158-6)...

>I second that.  ...

I have a copy of "Standard C" by Plauger & Brodie, but I don't use it 
much.  Reason:  The Table of Contents and the Index stink.  The primary
design goal behind the Table of Contents seems to have been to fit it 
all onto one page, with no regard for its usefulness to a reader.  As an
example, the chapter on preprocessing gets one entire line in the Table
of Contents:

	Preprocessing .......................................... 8

The chapter actually consists of the following sections:

	Preprocessing
		Phases of Translation
		Whitespace
		Preprocessing Tokens
		Include Directives
		Define Directives
			Expanding Macros
			Creating String Literals
		Conditional Directives
			The if Directive
			Restrictions on Conditional Expressions
			Other Conditional Directives
		Other Directives
		Predefined Macros

Likewise, the Table of Contents entries for the standard library consist
solely of a list of header files names:

	<assert.h>
	<ctype.h>
	 ...

There's not a whisper about what might be in these files.

How about an alphabetical list of all standard library functions?  Well, 
there is one in an appendix called "Names", but it includes everything
else, from keywords to data type names.  And there is not a single page
number in the list!  So once you've looked up a function name, there is
no reference to the page where the function is described.

So, try the index.  Look up "abs".  Not there.  No, wait a minute, it's
there, but it's not under "A", it's under "F", for "function".  So you
look under "F", then look under "function", and at last you find "abs".  
How about "assert".  Not there.  More detective work...  Ah ha!  Look 
under "M", then look under "macro", and there you find "assert".  Isn't 
this fun?

What if you don't know that "assert" is a macro?  No problem.  Look up
"assert" in the appendix "Names".  You will find out that it is a macro.
So now look in the index under "macro" to find "assert".  You will find
a page number.  Now turn there and read all about it.

What a waste!  Buy a copy of the C Standard from ANSI and get the lang-
uage definition direct from the source (no pun intended) with a Table of 
Contents and an index that won't waste your time and energy.


						Roger House



More information about the Comp.std.c mailing list