Mercurial > octave-nkf
diff doc/interpreter/func.txi @ 6477:a441d6681364
[project @ 2007-03-29 13:44:44 by jwe]
author | jwe |
---|---|
date | Thu, 29 Mar 2007 13:44:44 +0000 |
parents | ace8d8d26933 |
children | 68f3125f6e27 |
line wrap: on
line diff
--- a/doc/interpreter/func.txi Thu Mar 29 13:33:37 2007 +0000 +++ b/doc/interpreter/func.txi Thu Mar 29 13:44:44 2007 +0000 @@ -398,7 +398,7 @@ When Octave encounters an identifier that is undefined, it first looks for variables or functions that are already compiled and currently listed in its symbol table. If it fails to find a definition there, it -searches the list of directories specified by the built-in variable +searches the list of directories specified by the internal variable @code{LOADPATH} for files ending in @file{.m} that have the same base name as the undefined identifier.@footnote{The @samp{.m} suffix was chosen for compatibility with @sc{Matlab}.} Once Octave finds a file @@ -437,9 +437,7 @@ @c FIXME -- note about time stamps on files in NFS environments? -@DOCSTRING(DEFAULT_LOADPATH) - -@DOCSTRING(LOADPATH) +@DOCSTRING(path) @DOCSTRING(rehash) @@ -491,10 +489,11 @@ @end example To have Octave read and compile these functions into an internal form, -you need to make sure that the file is in Octave's @code{LOADPATH}, then -simply type the base name of the file that contains the commands. -(Octave uses the same rules to search for script files as it does to -search for function files.) +you need to make sure that the file is in Octave's @code{LOADPATH} +(accessible through the @code{path} function), then simply type the +base name of the file that contains the commands. (Octave uses the +same rules to search for script files as it does to search for +function files.) If the first token in a file (ignoring comments) is @code{function}, Octave will compile the function and try to execute it, printing a @@ -529,7 +528,7 @@ following code will always print @samp{bar = 3} whether it is typed directly on the command line, read from a script file, or is part of a function body, even if there is a function or script file called -@file{bar.m} in Octave's @code{LOADPATH}. +@file{bar.m} in Octave's path. @example @group