Path: csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Peter 'Shaggy' Haywood Newsgroups: comp.sys.apple2.programmer Subject: Re: malloc with cc65 Date: Wed, 27 Dec 2023 10:00:43 +1100 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: <20231214135300.3f65fe0f@smilodon-gracilis> <20231214215955.353cd4e4@smilodon-gracilis> <20231218005802.24df6e51@smilodon-gracilis> <20231220105200.7f518465@smilodon-gracilis> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Injection-Info: dont-email.me; posting-host="04d8f831a078921e2cc65d62ff1c44a5"; logging-data="3828601"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19q7q+6n+zV6l4vIsJyS0Ve+9nrIQ7H4DA=" User-Agent: KNode/0.10.9 Cancel-Lock: sha1:veBNXO5GcWX+yg12f8ljQ23gnm4= Xref: csiph.com comp.sys.apple2.programmer:6289 Groovy hepcat Bill Chatfield was jivin' in comp.sys.apple2.programmer on Thu, 21 Dec 2023 02:52 am. It's a cool scene! Dig it. > On Mon, 18 Dec 2023 19:51:58 -0000 (UTC) > Oliver Schmidt wrote: > >> No, the syntax above isn't for assigning a value to a pointer. It's >> for assigning a value to the address the pointer points to. > > OMG, it's been too long since I've written C code. Of, course you're > right and I knew that. The overloading of the * operator in one place > to define a pointer and in another place, the exact opposite, to > access the data pointed to by a pointer, has always perplexed me. 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." -- ----- Dig the NEW and IMPROVED news sig!! ----- -------------- Shaggy was here! --------------- Ain't I'm a dawg!!