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.time-shift
parent
77dd7239b5
commit
103b6cf803
|
@ -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!')
|
||||
|
|
Loading…
Reference in New Issue