Description
Syntax 1
The return statement can be used to immediately exit a local function.
Syntax 2
You should include at least one return statement in every subroutine that is called by a gosub statement. return causes the subroutine to "exit"; that is, it causes execution to continue at the statement following the gosub that called the subroutine.
You may also return to a specific location using return"label". This pops the return address from the stack, then jumps to the requested address.
Note
Subroutines are turned OFF by default in the FutureBasic translator. To use subroutines in your app, you will need to override a translator constant:
override_allowSubroutines = _true
Turning subroutines ON turns OFF the local function syntax, i.e. both syntaxes cannot co-exist in the same app.