The reference concept is meant to resemble heap allocated memory so inside a function the user should be able to load and modify the values of those references.
But you can build a reference inside a function to access variables outside the function. This is only allowed if the reference is passed as a function argument.
The reference concept is meant to resemble heap allocated memory so inside a function the user should be able to load and modify the values of those references.
But you can build a reference inside a function to access variables outside the function. This is only allowed if the reference is passed as a function argument.