I was asked a question on parameter passing today. So we came up with mnemonic to try and help you out.
Knowledge to remember
- By Reference = Input/Output = Changing the value of the original data
- By Value = Input = Changing the copy of the data.
Mnemonic – Remember you only need to remember one way to work out the reverse.
- PRO – Passing Reference Original/Output
- PVC – Passing Value Copy