On Friday 10 April 2015 23:01:14 David Wright wrote: > Quoting Gene Heskett (ghesk...@wdtv.com): > > On Friday 10 April 2015 10:28:24 Alexis wrote: > > > Having said that, one thing i always felt was sorely lacking in > > > K&R was a more thorough description of pointers. However, i feel > > > that issue has now been addressed by Richard Reese's excellent > > > "Understanding and Using C Pointers": > > My goodness, I just googled it, clicked on a link, and found I had > downloaded a copy! Published 2013. Where do they make their money? > (And do I call it the "Piping Crow Book" or will "Crow Book" do?) > > > That has never been a problem once you understand that a pointer, > > even to a 3 or 4 dimmensional array of data, is nothing more, nor > > less, than the address in memory of the first element of that array. > > ALL other offsets to other elements in that array are calculated, > > sometimes in the code issued by the compiler, or occasionally in > > issueing the code to calculate it on the fly. Not often done as its > > a huge speed hit when it does that. > > Sigh. You only have to read the first two paragraphs of the reference > for a contradiction of this: > > "A solid understanding of pointers and the ability to effectively use > them separates a novice C programmer from a more experienced > one. Pointers pervade the language and provide much of its > flexibility. They provide important support for dynamic memory > allocation, are closely tied to array notation, and, when used to > point to functions, add another dimension to flow control in a > program. > > "Pointers have long been a stumbling block in learning C. The basic > concept of a pointer is simple: it is a variable that stores the > address of a memory location. The concept, however, quickly becomes > complicated when we start applying pointer operators and try to > discern their often cryptic notations. But this does not have to be > the case. If we start simple and establish a firm foundation, then the > advanced uses of pointers are not hard to follow and apply."
This part never bothered me, and I did use the pointer as a pointer to a function a couple times. I can't put a finger on it, but that always seemd a bit spooky. But TBT, I think making full use of it would have been difficult with the C compiler I was using at the time. But now the years have added a considerable layer of rust to the wet ram, so I've been using bash scripts here on linux or straight assembly on the 6x09 machines I have. > > Cheers, > David. 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/201504110017.49430.ghesk...@wdtv.com