Question: what is difference between function and subroutine?
Answer: Functions and subroutines are called in the same way. The only difference between functions and subroutines is that functions must return data, whereas subroutines need not. ... If you call an internal routine as a function, you must specify an expression in any RETURN instruction so that the routine can return.