Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: technology discussion =?utf-8?Q?=E2=86=92?= does the world need a "new" C ? Date: Thu, 15 Aug 2024 14:36:00 -0700 Organization: A noiseless patient Spider Lines: 39 Message-ID: <86msldo4e7.fsf@linuxsc.com> References: <87r0c1nzjj.fsf@bsb.me.uk> <87ikxconq4.fsf@bsb.me.uk> <20240711115418.00001cdf@yahoo.com> <20240712154252.00005c2f@yahoo.com> <86o7717jj1.fsf@linuxsc.com> <20240717163457.000067bb@yahoo.com> <86a5hep45h.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Thu, 15 Aug 2024 23:36:01 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ea18f1ad42e487cc51a7cbceb5bfd3a2"; logging-data="1168008"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+r342aGpfkRQK6yJxGVykBkwuuNILM06I=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:6ujThQuHqUiWKrl0IXbtSRLaxmc= sha1:FDxT55NpfS1ZbWO5mwIPrquaWmg= Bytes: 2935 Bart writes: > On 15/08/2024 09:43, Tim Rentsch wrote: > >> Bart writes: >> >> [on comparing array arguments in C with call-by-reference] >> >>> [...] the differences [between C rules and true call-by-reference] >>> can be summarised here; [...] >>> >>> Call Array access in callee >>> >>> C call-by-value F(A) A[i] >>> >>> true call-by-reference H(A) A[i] >>> >>> What the user has to write is what's important, and here it is clear >>> that they write the same thing [in the two cases shown]. >> >> The comparison above is misleading because it is incomplete. >> Let's compare the two modes more fully: >> >> >> C call-by-value call-by-reference >> =============== ================= >> at call: >> >> (array argument) F(A) H(A) >> >> (pointer argument) F(p) (disallowed) > > My posts were about passing *arrays* and the fact that C's > pass-by-value was remarkably similar to pass-by-reference. I see. So your point is, if we ignore all the ways that the two modes are different then they are exactly the same. Brilliant deduction, Dr. Watson.