annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 13192
diff changeset
1 function s = set (s, varargin)
9381
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
2
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
3 propArgs = varargin;
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 13192
diff changeset
4 while (length (propArgs) >= 2)
9381
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
5 propName = propArgs{1};
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
6 propValue = propArgs{2};
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
7 propArgs = propArgs(3:end);
28922
c68b077c8fd6 maint: Use parentheses around conditional expressions in test/.
Rik <rik@octave.org>
parents: 16213
diff changeset
8 switch (propName)
9381
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
9 case 'click'
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
10 s.click = propValue;
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
11 otherwise
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 13192
diff changeset
12 error ([propName, ' is not a valid Cork property']);
9381
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
13 end
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
14 end
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
15
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents:
diff changeset
16 end