|
Contents | Previous | Next | Subchapters |
| Syntax |
nargout |
| See Also | nargin , arg(0) |
clear
function [x, y] = f(a, b) begin
x = nargout
end
[u, v] = f(5)
print u
O-Matrix will respond
2
because there are two return values in the call
to the function f.
If you continue by entering
f(5)
O-Matrix will respond
1
because there is only one return value
corresponding to the call to f.