Sujet : Re: technology discussion → does the world need a "new" C ?
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 10. Jul 2024, 16:48:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86ikxd8czu.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
bart <
bc@freeuk.com> writes:
I earlier asked this:
>
"So if arrays aren't passed by value in C, and they aren't passed
by reference, then how the hell ARE they passed?!"
They aren't. C allows lots of things to be passed as an argument
to a function: several varieties of numeric values, structs,
unions, and pointers, including both pointers to object types and
pointers to function types. C does not have a way for a function
to take an argument that is either an array or a function. There
is a way to take pointers to those things, but not the things
themselves. Arrays and functions are second-class values in C.
For some reason you insist on confusing your view of how the world
is with how the world actually is. No matter how many times you
ask the question, you're going to get the same answer, because the
people who are answering are saying how the world actually is, and
not how you think it is.