Functions  (Work In Progress)

A function is defined using the 'Function' keyword:

Function {funcname}( {params} )
End Function

{funcname} is any valid identifier.

{params} is a comma separated list of variables which is passed to the function when it is called, each parameter may be given an optional type tag. Parameters are always local.

A function may use the 'Return' statement to return a result. Return may optionally be followed by an expression.

If there is no Return statement, or a Return without any expression is used, the function returns a default value of 0 for numeric functions, an empty string ("") for string functions, or a 'Null' object for custom type functions.