Return (exit) from function

Syntax

ret [expression]

 

Parameters

expression - any expression. Default: 0.

 

Remarks

Use this statement to exit from a function and optionally return a value. If function returns not through ret, the return value is 0.

 

When used in a macro, ret also ends the macro. To end macro from a function, use end.

 

You should not use ret to return strings or arrays. Read the "Functions" topic.

 

See also: Functions

 

Example

ret 10