[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
11.7.6 Function Precedence
Given the numerous different ways that Octave can define a function, it is possible and even likely that multiple versions of a function, might be defined within a particular scope. The precedence of which function will be used within a particular scope is given by
- Subfunction A subfunction with the required function name in the given scope.
- Private function A function defined within a private directory of the directory which contains the current function.
- Class constructor A function that constuctors a user class as defined in chapter Object Oriented Programming.
- Class method An overloaded function of a class as in chapter Object Oriented Programming.
- Legacy Dispatch An overloaded function as defined by See doc-dispatch.
- Command-line Function A function that has been defined on the command-line.
- Autoload function A function that is marked as autoloaded with See doc-autoload.
- A Function on the Path A function that can be found on the users load-path. There can also be Oct-file, mex-file or m-file versions of this function and the precedence between these versions are in that order.
- Built-in function
A function that is builtin to Octave itself such as
numel
,size
, etc.