Hello Rich,
in the AM10 TaskBuilder, look at the line where you select the function you are working on. At the right hand edge of that line is a grid type button, immediately right of the red 'x'. Clicking that shows an area which allows you to define the parameters to the function, and nearby you can also specify the return type.
When calling the function, you simply pass the parameters in the usual way (they are passed by value, not by reference)
Finally, to return a value from the function, go to the Variable group of actions and in there is a Return action which should do what you need.
I hope that helps!