octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #32152] Changes to subfunctions take effect on


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #32152] Changes to subfunctions take effect only after 2nd saving if accessed as anonymous function.
Date: Mon, 17 Jan 2011 14:06:12 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.19) Gecko/2010102906 Iceweasel/3.0.6 (Debian-3.0.6-3)

URL:
  <http://savannah.gnu.org/bugs/?32152>

                 Summary: Changes to subfunctions take effect only after 2nd
saving if accessed as anonymous function.
                 Project: GNU Octave
            Submitted by: i7tiol
            Submitted on: Mon 17 Jan 2011 02:06:11 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: Olaf Till
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

If an anonymous function has been returned from a function and calls this
functions subfunction, changes to the subfunction take effect only after 2nd
saving.

Example:

define the following function "test_reread", containing the subfunction
"subf", in a function file:


function ret = test_reread ()

  ret = @ () subf ();

endfunction

function subf ()

  disp (1);

endfunction


Then, from the commandline, type:

octave:1> f = test_reread ();
octave:2> f ();
 1


Then, in "test_reread.m", change "disp (1)" to "disp (2)", then to "disp
(3)", and so on, and after each change save the function file exactly one time
and repeat the commands from the commandline. You should see that the
displayed number is one step behind.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32152>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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