[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31484] anonymous functions don't see function
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #31484] anonymous functions don't see functions in private/ |
Date: |
Mon, 01 Nov 2010 16:23:08 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12 |
Update of bug #31484 (project octave):
Priority: 5 - Normal => 2
_______________________________________________________
Follow-up Comment #4:
JWE beat me to it, but this bug is being re-opened since you can confirm the
behavior on at least one version of Matlab.
There are at least two simple workarounds for users who discover this thread
before this issue is fixed.
1) Call functions in private subdirectories directly, rather than through an
anonymous function handle.
2) Use functions defined within the same '.m' file. Those functions after
the first are file scoped, i.e., not visible in the global namespace and
behave similarly to placing them in a './private/' directory.
Amended example:
function private_test()
f = @() my_test_private();
f();
endfunction
# Subfunction in original file, not visible in global namespace
function my_test_private ()
# The function in the './private/' directory
test_private ();
endfunction
--
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31484>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/