Call a function using its name, as follows:
functinoname()
Parameter and return values do not exist in beas script, only variables can be used.
A function ends with returning success or failure. A function returns the <return> variable with value 1 for success or value -1 for afilure.
Three types of functions are available:
• | Methods or events of standard objects (public function) |
• | User defined instance functions (public function) |
• | Local function |
A public function definition is only visible in the window, in which the function is defined. A user defined global function is available after the function is created.
Syntax of the function definition:
global function myworld
[script]
end global
To execute this function:
myworld()