On 2019-07-09 13:25, Andrew Luke Nesbit wrote:
On 09/07/2019 09:09, Dan LaBell wrote:
And, Practical C Programming, Steven Oualline
(which I will part with in moment, and never really needed, but I will
still recommend it) because it contains every scold you would know by
heart,
if you learned programming, in the unix lab.
I see this book often and have skimmed through it once or twice. I
never saw anything particularly compelling about it. I will have a
closer look next time.
Understanding the dark corners of C is essential to understanding the
language properly. More importantly, it's important to know how to
protect oneself against widely propagated misinfomation. An example of
this kind of _misinformation_ is that arrays and pointers are the same.
That partly stems from the unfortunate double meaning of a pointer, and
also partly because of a little sloppy use of natural languages.
When we say "pointer", do we mean a pointer variable, or the content
that a pointer variable might store.
The r-value of a pointer variable is the same as the r-value of an array.
However, the l-value of a pointer variable is a pointer to the variable
itself, while an array do not have an l-value.
So an array and a pointer variable are certainly not the same thing.
But a pointer, in the meaning "an address", is always an address, don't
matter what it points to, or where you got that address from.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: [email protected] || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol