Function Reference
— Built-in Function: autoload (function, file)

Define function to autoload from file.

The second argument, file, should be an absolute file name or a file name in the same directory as the function or script from which the autoload command was run. file should not depend on the Octave load path.

Normally, calls to autoload appear in PKG_ADD script files that are evaluated when a directory is added to the Octave's load path. To avoid having to hardcode directory names in file, if file is in the same directory as the PKG_ADD script then

          autoload ("foo", "bar.oct");

will load the function foo from the file bar.oct. The above when bar.oct is not in the same directory or uses like

          autoload ("foo", file_in_loadpath ("bar.oct"))

are strongly discouraged, as their behavior might be unpredictable.

With no arguments, return a structure containing the current autoload map.

See also: PKG_ADD