Sujet : Re: technology discussion → does the world need a "new" C ?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 09. Jul 2024, 21:05:34
Autres entêtes
Organisation : None to speak of
Message-ID : <87ttgywctt.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Gnus/5.13 (Gnus v5.13)
bart <
bc@freeuk.com> writes:
On 09/07/2024 15:31, David Brown wrote:
[...]
In C, there is no "pass by reference" or "return by reference". It
is all done by value.
>
Arrays are passed by reference:
No, they are not.
Certain language features make it appear as if arrays are passed by
reference, but of course what's actually happening is that a pointer
(the address of the array's initial element) is passed by value.
Yes, C's treatment of arrays and pointers is confusing. You seem
to be determined to ensure that people continue to be confused.
Anyone who hasn't already done so should read section 6 of the
comp.lang.c FAQ, <
https://www.c-faq.com/>.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */