view test/classes/@Cork/set.m @ 28922:c68b077c8fd6

maint: Use parentheses around conditional expressions in test/. * fA.m, myclass2.m, foo_subsref_subsasgn.m, get.m, set.m, CPrecedenceTester2.m, CPrecedenceTester3.m, get.m, set.m, get.m, set.m, get.m, set.m, subsasgn.m, subsref.m, get.m, set.m, get.m, set.m, get.m, set.m, parent.m, recursive_nest.m, recursive_nest2.m, scope1.m, script_nest.m, varg_nest2.m: Use parentheses around conditional expressions in test/ directory.
author Rik <rik@octave.org>
date Tue, 13 Oct 2020 23:32:38 -0700
parents b1283d4c06c2
children
line wrap: on
line source

function s = set (s, varargin)

  propArgs = varargin;
  while (length (propArgs) >= 2)
    propName  = propArgs{1};
    propValue = propArgs{2};
    propArgs  = propArgs(3:end);
    switch (propName)
      case 'click'
        s.click = propValue;
      otherwise
        error ([propName, ' is not a valid Cork property']);
    end
  end

end