The following table describes the pass modes for function arguments.
Pass Mode | Description |
---|---|
in | The default. Specifies an input argument. Use this pass mode to get the value of the argument. Changes made to the argument are not reflected outside of the function, except when the argument is a complex data type. |
out | Specifies an output argument, used when you only want to set the argument's value. This argument is modified in a function and the new value is passed back out of the function when the function ends. |
inout | Specifies an input and output argument, used when you want to get the argument's current value and you want the function to change that value and pass the new value out. |