[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hiding subroutines?
From: |
taltman |
Subject: |
Re: Hiding subroutines? |
Date: |
Fri, 5 Dec 2003 23:53:31 +0000 (UTC) |
On Dec 5, 2003 at 11:44pm, address@hidden wrote:
TAltma >You can put just the main M-file in the path, and have it "source"
TAltma >files out-of-path. So throw all of your utility M-files into one
TAltma >Octave script file, and then call:
TAltma >
TAltma >source("/path/to/utilities.m");
I almost forgot: you probably will want to use 'clear' right before your main
function terminates, in order to clear your 'sourced' M-files from the
interpreter.
Here's some docs on the 'clear' function:
http://www.octave.org/doc/octave_10.html#SEC68
A neat trick is that if you name all of your functions consistently
with some {pre-|post-} fix tag, like "FooBar", then you can just type:
clear FooBar*
And all of your uniquely-named utility functions will be knocked out
in one fell swoop. :-)
~Tomer
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------