Return Keyword

Returns flow of execution to the calling method.

# Notes

Return [value]

Part | Type | Description
--- | --- | ---
value | Any | Value returned to the calling function. The data type must be specified in the Function declaration.

Use the Return keyword to immediately return control to the statement that called the method or function and to pass back a value. If the Return keyword is called in a method rather than a function, control is returned to the calling method without returning any value.

The value that a function returns can be an array or a single value. If you want to return an array, write empty parentheses after the name of the data type in the Return Type area in the Add Method area. For example, if you want to return an array of integers, write Integer () as the Return Type. If you need to return a multi-dimensional array, place one fewer commas in the parentheses than dimensions. For example, to return a two-dimensional array of Doubles, write Double(,) as the Return Type.

# See Also

Function, Sub statements.