On Monday 13 April 2015 17:22:34 Reco wrote: > Hi. > > On Tue, Apr 14, 2015 at 02:16:40AM +0800, Bret Busby wrote: > > On 14/04/2015, Reco <recovery...@gmail.com> wrote: > > > On Tue, Apr 14, 2015 at 12:36:28AM +0800, Bret Busby wrote: > > >> On 13/04/2015, Reco <recovery...@gmail.com> wrote: > > >> > > >> <snip> > > >> > > >> >Learning C is simple and > > >> > fun. Just read classic K&R treatise, do all the examples. Did > > >> > so back in > > >> > high school, and no brain was damaged in the process :) > > >> > The only problem today is to get a C compiler that understands > > >> > K&R C. > > >> > > >> I have not programmed in "C" for about 20-25 years, now, but, > > >> from memory, with compilers, like "C" compilers, don't they have > > >> a switch that can be set, so that they accept only ANSI code, > > >> such as ANSI "C"? > > > > > > *ANSI* C - yes. For instance, gcc has this wonderful '-ansi' > > > switch. It's even possible to choose the exact version of ANSI C > > > standard (i.e. -std=c99). > > > *K&R* C - no. At least, gcc-4.7 has no switch for this that I'm > > > aware of. > > > > Okay - this is where the detail of the Kernighan & Ritchie book, is > > required. > > > > You see, when I searched for "C" books, at amazon, I found at > > http://www.amazon.com/The-Programming-Language-Brian-Kernighan/dp/81 > >20305965/ref=pd_sim_b_1?ie=UTF8&refRID=02E2S6076Y4MYDCXP9RE > > > ><skip> > > > > So, the second edition, published in 1988, included ANSI "C", and, > > the picture of the from cover of the book, has a big stamp on it; > > "ANSI C". > > That's something that I didn't know. And that means that back in 1994 > they gave me first edition of the book :) Not that it stopped me from > reading it or trying the things they put in there. > > > So, it really depends on, if the original poster obtains, or, > > obtains access to, a copy of the text "The C Programming Language" > > by Kernighan and Ritchie, whether he gets a copy that is the second > > edition (1988) or later. > > > > If he gets a copy that is the second edition (1988), or later, then > > it should be ANSI "C". > > The only suspicious thing is - the oldest ANSI C standard that I'm > aware of is C89. Sure, K&R could use a draft of ANSI C standard in the > second edtition, but still...
That depends on the K&R version you have. I have both and they are in fact 95% alike. Blue & white cover, good printing job = 1st edition. Blue, white and red on the cover and it's ed 2, the ANSI C89 version. It was not finalized and published till about 92 or so. Its also a lousy print job, the copy I have was assembled, bound, and sold when the offset plates that printed it were, in the parlance of the offset printing business I am also familiar with, "blind" so large swathes of it have to be read under a good light with a magnifying glass. > > When I was learning "C", I found the (then available) Sam's Waite > > Group "C" Bible to be a brilliant reference manual, as it was a > > brilliant language reference manual. > > > > But, a reference manual, and, a teaching course, are two different > > things. > > Sure. That's why I'd like to add this: > > http://shop.oreilly.com/product/0636920025108.do > > The book assumes that you know the basics, and focuses on the ways of > using them right way (makefiles, pkg-config, that stuff). Good > reading. > > > Reco Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/201504131738.16048.ghesk...@wdtv.com