function call by value / call by reference
Hello,
when a function is called with parameters I normally can say "call by value" or "call by reference".
Question: 1. What is the default in processing, call by value or call by reference?
2. How can I tell my function to use "call by value" or "call by reference" for a parameter?
Explanation: call by value = only the value of the variable is given as a parameter. When you change the value in the function, nothing happens to the variable in the structure that calls our function.
call by reference = the reference to the variable is given as a parameter. This is the normal case. Anything the function changes with it, goes right back to the variable in the structure that calls our function.
That's the way I know it from visual basic.
Thank you!
Greetings,
Chrisir