12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

98 <strong>GNU</strong> <strong>Octave</strong>ignore function time stampBuilt-in VariableThis variable can be used to prevent <strong>Octave</strong> from making the system call stat eachtime it looks up functions defined in function files. If ignore_function_time_stampto "system", <strong>Octave</strong> will not automatically recompile function files in subdirectoriesof ‘octave-home/lib/version’ if they have changed since they were last compiled, butwill recompile other function files in the LOADPATH if they change. If set to "all",<strong>Octave</strong> will not recompile any function files unless their definitions are removed withclear. For any other value of ignore_function_time_stamp, <strong>Octave</strong> will alwayscheck to see if functions defined in function files need to recompiled. The defaultvalue of ignore_function_time_stamp is "system".warn function name clashBuilt-in VariableIf the value of warn_function_name_clash is nonzero, a warning is issued when<strong>Octave</strong> finds that the name of a function defined in a function file differs from thename of the file. (If the names disagree, the name declared inside the file is ignored.)If the value is 0, the warning is omitted. The default value is 1.warn future time stampBuilt-in VariableIf the value of this variable is nonzero, <strong>Octave</strong> will print a warning if it finds a functionfile with a time stamp that is in the future.13.7 Script FilesA script file is a file containing (almost) any sequence of <strong>Octave</strong> commands. It is readand evaluated just as if you had typed each command at the <strong>Octave</strong> prompt, and providesa convenient way to perform a sequence of commands that do not logically belong inside afunction.Unlike a function file, a script file must not begin with the keyword function. If it does,<strong>Octave</strong> will assume that it is a function file, and that it defines a single function that shouldbe evaluated as soon as it is defined.A script file also differs from a function file in that the variables named in a script fileare not local variables, but are in the same scope as the other variables that are visible onthe command line.Even though a script file may not begin with the function keyword, it is possible todefine more than one function in a single script file and load (but not execute) all of themat once. To do this, the first token in the file (ignoring comments and other white space)must be something other than function. If you have no other statements to evaluate, youcan use a statement that has no effect, like this:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!