14
edits
m (use direct url instead of archived docs) |
(local functiosn in classdef files) |
||
Line 42: | Line 42: | ||
As a workaround, we can create an indirection using an anonymous function <code>fh = @(varargin) mypackage.myfunc(varargin{:})</code>. | As a workaround, we can create an indirection using an anonymous function <code>fh = @(varargin) mypackage.myfunc(varargin{:})</code>. | ||
Similarly for static class methods where <code>fh = @MyClass.myfunc</code> isn't yet supported. | Similarly for static class methods where <code>fh = @MyClass.myfunc</code> isn't yet supported. | ||
* Defining [http://www.mathworks.com/help/matlab/matlab_oop/specifying-methods-and-functions.html#br2la89 local functions] in the same classdef-file is not working. For example, the following code gives a syntax/parse error: | |||
<source lang="octave"> | |||
classdef MyClass | |||
methods | |||
function obj = MyClass() | |||
myfunc() | |||
end | |||
end | |||
end | |||
function myfunc() | |||
disp('myfunc') | |||
end | |||
</source> | |||
==== supported ==== | ==== supported ==== |
edits