FANDOM


Functions are like messages, but they returns a value. Usually a function is used to perform complex action on a value, otherwise messages are more common and uses by programmers.

Syntax is:

function MyFunc param1
 return param1 + 1
end MyFunc

and is used this way

on MouseUp
 answer MyFunc(4)
end MouseUp

Be careful not to put parenthesis around the parameters you are passing. If you do, these are evaluated as a single parameter.

put ReturnContact((firstName,LastName),address) into tName

function ReturnMyFullName firstName,LastName,address
 return firstName
end ReturnMyFullName

tName will contain both the firstName & LastName because these are evaluated as param 1 due to the parentheses.

Here is a list of common of available functions:

(pleas help us to complete this list)