Mercurial > hg > octave-nkf
changeset 15957:db6371b97fed classdef
Fix bug in test/classdef/foo_payment.m.
* test/classdef/foo_payment.m: Using struct() to initialize object
is not valid syntax.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Tue, 15 Jan 2013 19:52:18 -0500 |
parents | d8553705f8f0 |
children | 4aedc32e3f4d |
files | test/classdef/foo_payment.m |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/test/classdef/foo_payment.m +++ b/test/classdef/foo_payment.m @@ -6,13 +6,11 @@ end methods function obj = foo_payment (r, t, p) - if (nargin == 0) - obj = struct ('rate', 0, 'term', 0, 'principle', 0); - elseif (nargin == 3) + if (nargin == 3) obj.rate = r; obj.term = t; obj.principle = p; - else + elseif (nargin ~= 0) error ('foo_payment:SyntaxError', ... 'foo_payment: Invalid syntax') end