Editing Developer FAQ
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== | == ''How can I find which file implements a given command?'' == | ||
From within Octave, use <code>which</code>: | |||
<syntaxhighlight lang="Octave"> | <syntaxhighlight lang="Octave"> | ||
>> which help | >> which help | ||
Line 31: | Line 8: | ||
'help' is a function from the file /some/path/m/help/help.m | 'help' is a function from the file /some/path/m/help/help.m | ||
If the desired function is a m-file, one can simply edit it inside the GUI, just type: | |||
<syntaxhighlight lang="Octave"> | <syntaxhighlight lang="Octave"> | ||
>> edit help | >> edit help | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Some functions are already compiled (a.k.a. ''built-in functions''), for example: | Some functions are already compiled (a.k.a. ''built-in functions''), for example: | ||
Line 47: | Line 21: | ||
'addpath' is a built-in function from the file libinterp/corefcn/load-path.cc | 'addpath' is a built-in function from the file libinterp/corefcn/load-path.cc | ||
This function is to be found in Octave's source code, in this case at | This function is to be found in Octave's source code, in this case at [https://hg.savannah.gnu.org/hgweb/octave/file/b33d4fbce33e/libinterp/corefcn/load-path.cc#l2355]. | ||
If the source code is cloned to a local machine, you can edit the repective file and search for something like "<code> (addpath,</code>". | |||
[[Category:Development]] | [[Category:Development]] | ||