Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.lang.c Subject: Re: ANSI C /K&R 2nd edition questions,... Message-ID: <12234@dog.ee.lbl.gov> Date: 18 Apr 91 18:30:28 GMT References: Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 44 X-Local-Date: Thu, 18 Apr 91 11:30:28 PDT >>>If there should be a general or common opinion that the 2nd edition of >>>K&R is not adequate for knowing the ANSI standard, can anyone >>>recommend something readable/usable? In an article whose referent was deleted (not by me), I wrote: >>There are plenty of books that purport to `boil down' the standard >>into nice, easy, bite-sized bits, but none of them will give you the >>Ultimate Answer to any question. In article cschmidt@lynx.northeastern.edu writes: >[Plauger and Brodie recommendation] >Consider a common example: The book "Standard C" includes a >list of standard header files. If you want to know whether one of the >header files provided with your compiler can be counted on when you >port your program to another ANSI C compiler, this book provides an >answer. Surely, and it is almost certainly correct as well. I am not saying that the books that `boil down' the standard are not useful, nor even that they are not `all you need if you want to write ANSI C'. But look at the original question again: `What should I read so that I know the ANSI standard?' The ONLY thing you can read that contains the ANSI C standard *is* the ANSI standard, X3.159-1989. If you want the Ultimate Answer to `what does printf("%d %d\n", (v++, 0), (v++, 1)); do?' (see comp.std.c), you have to look at the standard---any reasonable book will just say `avoid this' (which is right). The standard will tell you, in very many words, whether you have violated a constraint, invoked implementation-defined or undefined behavior, and so on. Perhaps I am simply being overly literal with the original question, but it seems *very* clear to me that the desire was `to know the ANSI standard' rather than `to be able to use ANSI C portably, efficiently, etc.'. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov