Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C Programming Tutorial on Youtube Date: Mon, 10 Oct 2016 16:29:44 -0700 Organization: None to speak of Lines: 35 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="c91660510313b0b3b2b18aebbb52bfad"; logging-data="13090"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vXawC1q0vT/TXjWAAB8Hx" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:hPM4XEgAHapSfwKd8rds6GChkKQ= sha1:O7sS2yHJw89VXbW2GN94ZZQR84Y= Xref: csiph.com comp.lang.c:94698 Richard Heathfield writes: > On 10/10/16 22:11, Stefan Ram wrote: >> Richard Heathfield writes: >>> Also at 55 seconds, the comment is misleading: "a pointer is a variable" >>> - well, not necessarily. >> >> But then: >> >> "A pointer is a variable" - >> >> right at the start of chapter 5 of >> "The C programming language"; >> Brian W. Kernighan, Dennis M. Ritchie; >> second edition; 1988. >> >> This might be wrong according to ISO/IEC 9899, but at least >> the proponents of this are in good company, and ISO/IEC 9899 >> possibly does not define "pointer" at all, so that there >> might not be a direct contradiction to ISO/IEC 9899. > > It was because I recalled the K&R2 quote that I was reluctant to call > this "wrong". But I still think it's misleading. (void *)0 is a pointer, > but it isn't a variable (whatever a variable might be). As I've said here before, if there's any chance of confusion it's best to think of the word "pointer" (as well as "array" et al) as an adjective, not as a noun. If we talk about pointer values, pointer expressions, pointer objects, pointer types, etc., we have a better chance of avoiding ambiguity. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"