Assigning parameter on entry to a function and assigning back on exit
Ali Çehreli
acehreli at yahoo.com
Fri Nov 25 13:15:39 UTC 2022
On 11/25/22 05:06, Victor Porton wrote:
>> A function argument that is both input and output, may be passed to
>> the function either as reference or do two assignments: on entry of
>> the function it is assigned to the parameter, on exit it is assigned
>> back.
The way I understand it with C, C++, and D, if there were such an
assignment back, that could only be performed by the caller. I don't
think the ABIs of those languages support that behavior.
I think there is only pass by reference for out parameters.
Ali
More information about the Digitalmars-d-learn
mailing list