Commit 103b6cf8 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Changed the syntax so that the difference between calling a member or a method is more explicit.

If a is a dynDate object:

a.format or a.format() are allowed because format is a method.

a.freq is allowed but a.freq() returns an error message because freq (same for time) is a member.
parent 77dd7239
......@@ -56,6 +56,9 @@ switch S(1).type
case 'format'
B = format(A);
case {'time', 'freq'}
if length(S)>1 && isequal(S(2).type,'()') && isempty(S(2).subs)
error(['dynDate::subsref: ' S(1).subs ' is not a method but a member!'])
end
B = builtin('subsref', A, S(1));
otherwise
error('dynDate::subsref: Unknown public member of method!')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment