Function
A Function is a subroutine similar to a Procedure, returning a value.
Syntax:
-
- [Program Code]
- Return Expression
- [Program Code]
- endFunc
- Name: Identifier of the subroutine
- Var: Identifier of the parameter variable
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