[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: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #39257] handles to nested functions are not yet supported |
Date: |
Sun, 07 Feb 2016 11:00:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #6, bug #39257 (project octave):
The attached patch allows a handle to be taken of a nested function, and
prevents that handle being exported (either as a return value or through a
global variable) out of the scope in which the shared variables are defined.
This does *not* allow constructs like the one in comment #3. However, it
should allow GUIs made through Guide. Please report back here if they cause
problems.
I plan to check how Matlab handles constructs like comment #3. Specifically,
I want to know if it use the most recent value assigned to x, including
subsequent calls to test_closure, or if it sticks with the value of x at the
function exit. In the former case, we could just make x persistent. In the
latter case, the handle would somehow have to keep its own copy of x, like an
anonymous function does.
(file #36269)
_______________________________________________________
Additional Item Attachment:
File name: bug_39256_local.cset Size:9 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39257>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/