Functions
A function is similar to a subroutine ( Gosub) except that it can accept parameters (inputs) from its caller. In addition, a function may optionally return a value to its caller. Consider the following simple function that accepts two numbers and returns their sum: Add(x, y) { return x + y; "Return" expects an expression.
https://www.autohotkey.com/docs/Functions.htm#lib