From bug-request at octave dot org Fri Mar 10 14:35:10 2006 Subject: Re: Function handle not correctly updated From: "John W. Eaton" To: David dot Bateman at motorola dot com Cc: bug at octave dot org Date: Fri, 10 Mar 2006 15:34:59 -0500 On 28-Jan-2006, David Bateman wrote: | Bug confirmed with the latest CVS. In fact its even worse than just | function handles. Even fnctions defined on the command-line suffer from | this. That is | | octave:1> function y = foo(x), y = 3 + x; endfunction | octave:2> foo(4) | ans = 7 | octave:3> function y = foo(x), y = 3 - x; endfunction | octave:4> foo(4) | ans = 7 This part has been fixed for a while now. I think it was this change: 2006-02-08 John W. Eaton * parse.y (frob_function): Clear ID_NAME from top_level symbol table if we are defining a function at the top-level and a function with the same name is already in the top-level symbol table. The problem with function handles is not yet fixed, though I have an idea about what is causing the problem. My guess is that the function handle grabs a pointer to a octave function object and never checks to see if it changes. jwe ------------------------------------------------------------- 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 -------------------------------------------------------------