checkNamedArguments
Return list of unexpected named arguments
Syntax
names = checkNamedArguments()
Arguments
- names
a vector of string with names of variables
Description
Returns names of named variables passed to current function but that are not in the function prototype.
Examples
function foo(a, b) x = checkNamedArguments(); disp("Named Variable:", x); endfunction //No additional named variable foo(1); foo(1, 2); foo(a = 1, b = 2); foo(b = 2, a = 2); //With additional named variables foo(a = 1, c = 2); foo(c = 2, b = 2);
See also
- who — listagem de variáveis
Report an issue | ||
<< Constants | Variables | clear >> |