First page Back Continue Last page Overview Graphics

Passing Values to Subroutines


If the address of the data is passed to the subroutine, the subroutine can then change the data. On the other hand, if only the value is passed, the original data cannot be changed. Which choice is appropriate depends on the application.

However, if an array needs to be passed, it is not practical to pass the array by value (especially if the size of the array is large, unknown,or variable). Arrays are passed by address.