[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39257] handles to nested functions are not ye
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #39257] handles to nested functions are not yet supported |
Date: |
Tue, 3 Apr 2018 11:17:57 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #19, bug #39257 (project octave):
What value of variables from the enclosing scope is supposed to be used? The
value at the time the handle is created? What about something like this
function [fh1, fh2, fh3] = foo (y)
fh1 = @nest;
function r = nest (x)
r = [x,y,z];
end
z = 3;
fh2 = @nest;
z = 4;
fh3 = @nest;
end
Given the above function, what does Matlab do for
[fh1, fh2, fh3] = foo (2);
fh1 (1)
fh2 (1)
fh3 (1)
foo (20)
fh1 (1)
fh2 (1)
fh3 (1)
?
In any case, I suspect that this is too complicated to fix properly for 4.4
and will have to wait until later, so I will likely undo the change I made
earlier today.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39257>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/