The concepts of functions and subroutines have already been mentioned, but not properly defined. In principle all of the mentioned terms cover the same concept, but just to make things clear we will define them.
Definitions A function is a general term used in programming. A function is a structure that requires some sort of data and based on this data, it performs a series of operations and finally returns a value. We know functions from software like Microsoft Excel. For instance the Average function takes a series of numbers (or ranges of numbers) as its arguments (we call the data needed by the function arguments) and returns the average of these values.
Declarations Previous examples have illustrated how a subroutine is defined in a Passolo Script Engine module. The Sub keyword declares the subroutine and it is followed by the name of the subroutine.