Mercurial > octave-nkf
comparison scripts/plot/util/refreshdata.m @ 19867:9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Try to trim long lines to < 80 chars.
Use '##' for single line comments.
Use '(...)' around tests for if/elseif/switch/while.
Abut cell indexing operator '{' next to variable.
Abut array indexing operator '(' next to variable.
Use space between negation operator '!' and following expression.
Use two newlines between endfunction and start of %!test or %!demo code.
Remove unnecessary parens grouping between short-circuit operators.
Remove stray extra spaces (typos) between variables and assignment operators.
Remove stray extra spaces from ends of lines.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 23 Feb 2015 14:54:39 -0800 |
parents | 4197fc428c7d |
children |
comparison
equal
deleted
inserted
replaced
19866:a1acca0c2216 | 19867:9fc020886ae9 |
---|---|
88 ## regexp() is proper way to do searching, but is 3X slower. | 88 ## regexp() is proper way to do searching, but is 3X slower. |
89 ## Pretty unlikely that people are going to be adding datasource | 89 ## Pretty unlikely that people are going to be adding datasource |
90 ## properties that are not, in fact, datasources. | 90 ## properties that are not, in fact, datasources. |
91 ## m = regexp (flds, '^.+datasource$'); | 91 ## m = regexp (flds, '^.+datasource$'); |
92 m = strfind (flds, "datasource"); | 92 m = strfind (flds, "datasource"); |
93 m = flds(!cellfun (@isempty, m)); | 93 m = flds(! cellfun (@isempty, m)); |
94 for j = 1 : numel (m) | 94 for j = 1 : numel (m) |
95 if (isempty (obj.(m{j}))) | 95 if (isempty (obj.(m{j}))) |
96 continue; # datasource field doesn't point to anything | 96 continue; # datasource field doesn't point to anything |
97 endif | 97 endif |
98 expr = obj.(m{j}); # datasource field | 98 expr = obj.(m{j}); # datasource field |