return

March 6th, 2008 Posted in Controls

Return to invoking function.
return causes a return to the invoking function or to the keyboard.
It also terminates the KEYBOARD mode.

Normally return when the of the function is reached.
A return statement can be used to force an early return.

Example

1
2
3
4
5
6
7
function d = det(A)
if isempty(A)
d = 1;
return
else
...
end

See also function, keyboard.

Leave a Reply

You must be logged in to post a comment.