Return

Return [expr]

Exits the user function.

The keyword may be followed by an expression, the result of which will be returned by the function. An expression can only be in functional notation.

Examples

r = MyFunc(1)
 
# r = Positive
 
Func MyFunc(var)
  If var > 0 Then
    Return "Positive"
  ElseIf var < 0 Then
    Return "Negative"
  Else
    Return "Zero"      
  EndIf
EndFunc

Related

Func...EndFunc