Groovy hepcat Bill Chatfield was jivin' in comp.sys.apple2.programmer on
Mon, 1 Jan 2024 03:58 am. It's a cool scene! Dig it.
On Wed, 27 Dec 2023 10:00:43 +1100
Peter 'Shaggy' Haywood <[email protected]> wrote:
There's no overloading going on here (notwithstanding its use the
multiplication operator). It's really quite simple. The * operator
means "the object pointed at". When used in a declaration it still
means "the object pointed at". A pointer to foo (where foo is a type)
declaration essentially means, "Declare an object which is a pointer
such that the object pointed at by it is a foo."
I see what you're saying, after much mind bending. Maybe that is the
correct way to think about it.
The way I was thinking about it, in the declaration, the * produces a pointer. In an expression the * produces data from a pointer.
Dereferences the pointer, yeah, that's basically correct. But you have
to sort-of shift your thinking sideways a bit to understand what's
really going on. A declaration containing an asterisk means "declare an
object that points at foo". That's perhaps a more idiomatic but less technically precise way of saying "declare an object which is a pointer
such that the object pointed at by it is a foo." The asterisk itself
means "the object pointed at".
It may sound odd at first, but makes perfect sense once you get it. :)
--
----- Dig the NEW and IMPROVED news sig!! -----
-------------- Shaggy was here! ---------------
Ain't I'm a dawg!!
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)