For example, I defined a user function with a module and what this function does is take the values of two global variables
gb and write another two global variables
gdiff with their sum and difference, respectively. How can I define a user function in the form
fun[a_, b_, sum_, diff_] := Module[ ...]
so that I can get
gdiff written with the correct values when I call this user function by
fun[ga, gb, gsum, gdiff]
I guess another way to put my question is, how to define a user function with not only input arguments, but also output arguments?