What is subroutine
In computer programming, a subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed
What is the difference between function and subroutine?
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.