How do I use variables in functions/procedures

I'm not sure about @qubits-us answer, but you have definitely not understood my answer!