Function

function functionName(zero or more parameter variable names)
  'code for the function goes in here
  functionName = returnValueExpression
end function

This statement defines a function.  The function can return a string value, or a numeric value. A function that returns a string value must have a name that ends with the "$" character.  A function that returns a numeric value must not include a "$" in its name.  Zero or more parameters may be passed into the function.  A function cannot contain another function definition, nor a subroutine definition.  Note that the opening parenthesis is actually part of the function name. Do not include a space between the name and the opening parenthesis, or the code generates an error.