|
From: | Amro |
Subject: | [Octave-bug-tracker] [bug #45410] in Octave +package directories must be on path, in ML they must not be added to path |
Date: | Fri, 26 Jun 2015 13:44:50 +0000 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #3, bug #45410 (project octave): I wasn't sure if I should create a new bug or just update the current one, but here is an actual issue related to path <http://www.mathworks.com/help/matlab/search-path.html>, packages <http://www.mathworks.com/help/matlab/matlab_oop/scoping-classes-with-packages.html#brfynt_-3>/classes <http://www.mathworks.com/help/matlab/matlab_oop/organizing-classes-in-folders.html#br5wlnh>, and private functions <http://www.mathworks.com/help/matlab/matlab_prog/private-functions.html>: ./testdir/+foo/ ./testdir/+foo/bar.m ./testdir/+foo/private/baz.m -verbatim+ where "bar.m" is a function that calls a private function "baz.m". function x = bar() x = baz(); end -verbatim+ and function x = baz() x = pi; end -verbatim+ In Octave the following fails (while it works fine in MATLAB): >> addpath('C:testdir') >> foo.bar error: 'baz' undefined near line 2 column 9 error: called from bar at line 2 column 7 I had to explicitly add the private folder to the path for it to work: >> addpath('C:testdir+fooprivate') >> foo.bar ans = 3.1416 ---- Similarly, private functions inside @-class folders: ./testdir/@MyClass/ ./testdir/@MyClass/MyClass.m ./testdir/@MyClass/private/myfunc.m -verbatim+ Trying to call "myfun.m" from class methods will generate a similar 'undefined function' error... _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?45410> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |