Developer FAQ

From Octave
Revision as of 07:38, 10 May 2016 by Lachlan (talk | contribs) (Finding source for a given function)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

1. How can I find which file implements a given command?

From within Octave, use 'which':

octave:1> which addpath
'addpath' is a built-in function from the file libinterp/corefcn/load-path.cc

While editing the file, the function definition usually matches a regular expression like

^(addpath,

(The '(' may need to be escaped, depending on the flavour of regular expression used.)