help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing files, indexing operations...


From: James Frye
Subject: Re: Editing files, indexing operations...
Date: Mon, 23 Dec 2002 13:52:59 -0800 (PST)

On Mon, 23 Dec 2002, John W. Eaton wrote:

> I am still interested in implementing something like this if we can
> decide what is best for Octave.
> 
> So, how should nested/local functions behave?  Are we constrained to
> the more limited way that Matlab handles nested functions, or can we
> have real nested functions (i.e., multiple levels of nesting, not just
> one) without causing a compatibility problem?

I looked at those links, but the nested function idea doesn't really
seem to relate to what I'm trying to do, which is to a) convert existing
Matlab stuff with as little change as possible, and b) have the
converted scripts still work in Matlab.

I don't know anything about the internals of octave, so maybe this isn't a
reasonable suggestion, but couldn't something be done with a mechanism
that would appear as a comment to Matlab?  Say 

%internal_functions aa, bb, cc...

where %internal_functions says that the named functions are defined within
the file, so somehow create an internal namespace for them, and when/if
the execution path through the file calls them, instead of looking in
external .m files for the function definition, look within the current
file.  (And it is an error to name an internal function that isn't defined
in the file, even if there's a .m file with that name.)

James



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]