Mercurial > octave
changeset 24186:422814bf8b41
Use double underscores around global variables to avoid namespace conflicts.
* __printf_assert__.m, __prog_output_assert__.m: Change global variable
"_assert_printf" to "__assert_printf__".
author | Rik <rik@octave.org> |
---|---|
date | Sun, 29 Oct 2017 21:01:32 -0700 |
parents | 068556c5167e |
children | ff9bd559799b |
files | scripts/testfun/__printf_assert__.m scripts/testfun/__prog_output_assert__.m |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/testfun/__printf_assert__.m Sun Oct 29 17:33:41 2017 -0700 +++ b/scripts/testfun/__printf_assert__.m Sun Oct 29 21:01:32 2017 -0700 @@ -22,9 +22,9 @@ ## @end deftypefn function __printf_assert__ (varargin) - global _assert_printf = ""; + global __assert_printf__ = ""; - _assert_printf = cat (2, _assert_printf, sprintf (varargin{:})); + __assert_printf__ = cat (2, __assert_printf__, sprintf (varargin{:})); endfunction
--- a/scripts/testfun/__prog_output_assert__.m Sun Oct 29 17:33:41 2017 -0700 +++ b/scripts/testfun/__prog_output_assert__.m Sun Oct 29 21:01:32 2017 -0700 @@ -22,17 +22,17 @@ ## @end deftypefn function ret = __prog_output_assert__ (str) - global _assert_printf = ""; + global __assert_printf__ = ""; - if (isempty (_assert_printf)) + if (isempty (__assert_printf__)) ret = isempty (str); - elseif (_assert_printf(end) == "\n") - ret = strcmp (_assert_printf(1:(end-1)), str); + elseif (__assert_printf__(end) == "\n") + ret = strcmp (__assert_printf__(1:(end-1)), str); else - ret = strcmp (_assert_printf, str); + ret = strcmp (__assert_printf__, str); endif - _assert_printf = ""; + __assert_printf__ = ""; endfunction