Navigation

Operators and Keywords

Function List:

C++ API

: autoload_map = autoload ()
: autoload (function, file)
: autoload (…, "remove")

Define function to autoload from file.

The second argument, file, should be an absolute filename 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 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 usage when bar.oct is not in the same directory, or usages such as

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

are strongly discouraged, as their behavior may be unpredictable.

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

If a third argument "remove" is given, the function is cleared and not loaded anymore during the current Octave session.

See also: PKG_ADD.

Package: octave