Liste des Groupes | Revenir à cl c |
On 15/08/2024 09:43, Tim Rentsch wrote:
>Bart <bc@freeuk.com> 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.
Les messages affichés proviennent d'usenet.