return

Returns control to OML interpreter.

Syntax

function myFunction(n)
  return
end

Example

Simple return example.

function[returns]=returnIn(a)
  for j=1:10
    if a < 5
      returns = j
      a=a+1
    else
      return
    end
  end
end

b = returnIn(2)
returns = 1
a = 3
returns = 2
a = 4
returns = 3
a = 5
b = 3