DO MyProc WITH MyParamby default, the parameters are passed by reference. This means that any changes made to them in the called procedure will be seen in the calling procedure. Of course, you can get around this and pass the parameters by value like this:
DO MyProc WITH ( MyParam )On the other hand, when you call a function, parameters, by default, are passed by value. This means that any changes made in the called function will not be seen in the calling program. Of cource, you can always get around this and explicitly pass the parameters to the function by reference:
luRetVal = CallMyFunction( @param1, @param2 )