Liste des Groupes | Revenir à cl c |
On 11/07/2024 22:36, bart wrote:KT has chosen not to answer, and now you are evading it too. I'm asking why this:On 11/07/2024 21:29, Keith Thompson wrote:Are you trying to blame us for how C is defined?bart <bc@freeuk.com> writes:>>The language could have helped a little by making this invalid:>
>
int A[20];
>
void F(int B[20]) {}
>
The type of B looks just like that of A, but it isn't; the T[N] type
is silently changed to T*. The language could insist that you write:
>
void F(int* B) {}
But it doesn't. Why should we waste time in comp.lang.c explaining how
C *could* have been defined? It's hard enough to explain how it
actually is defined, especially with your contributions.
>This way, it is far clearer that a pointer is being passed, and 'pass>
by value' now makes more sense. The way B will be used is now
consistent with the same declaration anywhere else.
But that's not C.
Why isn't it C?
Les messages affichés proviennent d'usenet.