Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes:
Probably, and perhaps not just me! But I'd still quite like to know exactly what it is that is marked as 'disallowed'.You or he would have to go into more detail, such as an actual example, toNo one has said any such thing, so I can't see how any more detail could
demonstrate whatever it is that you think is wrong about passing a pointer
argument by-reference.
help. I suspect you've lost track of the point being made.
Do you mean: 'You can't pass a pointer to a function that takes an array passed by reference'?I can't see what is confusing you about this. I agree with the aboveI can't unravel this. Take, as a concrete example, C++. You can't pass>
a pointer to function that takes an array passed by reference. You can,
of course, pass a pointer by reference, but that is neither here nor
there.
OK. So why do you agree with this:
>>C call-by-value call-by-reference
=============== =================
(pointer argument) F(p) (disallowed)
What is 'pointer argument' here?
for exactly the reasons I wrote.
It would be wrong (and is wrong inWell, putting aside pass-by-reference, that would be wrong in C too, if you interpret 'array reference' to be a type like T(*)[], and a 'pointer' a type like T*.
C++) to pass a pointer where an array reference is expected.
Les messages affichés proviennent d'usenet.