What is the difference in passing a structure by val and byref?
Risposte di colloquio
Anonimo
8 ott 2010
nothing. both are passing the structure by a pointer so both methods can modify the elements. doesn't matter that by ref is a pointer to a pointer
Anonimo
30 ott 2020
Passing by value - called function gets a copy of the parameters.
Passing by reference - means called function gets the address location of the parameters. Any changes on the parameter values will be permanent after the function exits.