Function

A Function is a subroutine similar to a Procedure, returning a value.

Syntax:

Example of a function declaration and call to it:

// Main program
dim result as word
result=Addition(112,33) // Calls the function
 
function Addition(var1 as word, var2 as byte) as word
  return var1+var2
endfunc