function <funktionsname>
Important without "=" and without parameter
this is a local function and is only visible in this script. To define function, which are visible in the window, use "global function"
in beas-scripts functions havn't parameters and only one return-variable "return"
if you exit the function with "return failure", the return-value = -1, "return success" = 1 other = 0
work only with lower case!
Syntax:
function myfunc
... Script
end
Call:
myfunc()
This can only be uses inside of Scripts.
Example:
// example
displaymessage()
return
function displaymessage
messagebox=This is my sub-function
end function
Remark:
Functions also can be call inside the first parameter of an if statement.
Return value can be -1 or 1
Example:
if=colorquestion()=-1=cancel
messagebox=info$your color is red
return success
function colorquestion
question=Another Color as red?=success=failure
end function