From mboxrd@z Thu Jan 1 00:00:00 1970 From: dave@horsfall.org (Dave Horsfall) Date: Fri, 12 May 2017 09:44:40 +1000 (EST) Subject: [TUHS] C declarations. In-Reply-To: References: <015401d2caa0$79762650$6c6272f0$@ronnatalie.com> Message-ID: On Thu, 11 May 2017, Arthur Krewat wrote: > But wouldn't that imply you didn't need to use the * when referencing > the actual value? > > For example, if you do this: > > char *p; > char c; > > The correct way to get the character it's pointing to dereference like > this: > > c=*p; > > If the type was char* (not char) > > Wouldn't that imply I wouldn't need the * to dereference the pointer? No, because you'd be assigning the contents i.e. the address (or however references are implemented on a given architecture) to a character; whether the fundamental type is "char*" or ("mostly char but it's really a pointer") is the same. Then again, I learned ALGOLW (and PASCAL) before I learned C, and it has a "REFERENCE" type... -- Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."