help-octave
[Top][All Lists]
Advanced

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

Re: Exec


From: John W. Eaton
Subject: Re: Exec
Date: Tue, 7 Mar 2000 01:03:32 -0600 (CST)

On  1-Mar-2000, Joao Cardoso <address@hidden> wrote:

| Tom Weichmann wrote:
| 
| > Dear octave users,
| >
| > Is there a way to disable octave's ability to execuite shell
| > commands, ie exec('your command here').
| 
| octave:1> function y=exec(x); y=sin(x);endfunction
| error: can't redefine read-only function `exec'
| 
| This is also a problem for me, but for other reasons. I would like to
| *redefine* internal Octave functions, say, 'min()'. There is an 'alias'
| function in Octave internals, but I never was able to use it... I always
| get a core dump.
| 
| Has someone suceeded?

To do this properly would require some care to get it everything right
given the current semantics of automatically reloading functions when
the .m or .oct file that defines them changes.  For example, if you
write

  alias ("new_name_for_foo", "foo");

and then edit foo.m, I would expect an invocation of
`new_name_for_foo' to also reflect the changes.

I think it is possible, but not necessarily trivial to make these
changes.  I agree that it might be nice to have this feature, along
with the ability to redefine built-in functions (if used carefully
and sparingly), but I don't have the time to work on it myself.

Sorry,

jwe



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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