view test/bug-54490.tst @ 30873:e180bcbf7ce2

clock.m: Add second output to indicate DST for Matlab compatibility. * NEWS: Announce change in Matlab Compatibility section. * clock.m: Add second output "isdst" to indicate if Daylight Savings Time is in effect on the current system. Rename original output from "retval" to "datevec".
author Rik <rik@octave.org>
date Wed, 30 Mar 2022 16:26:03 -0700
parents 9080316864bf
children
line wrap: on
line source

%!function out = bug54490 ()
%!  global k;
%!  k = 1;
%!  out = 3;
%!endfunction

%!test <*54490>
%! global k;
%! k = 2;
%! a = [5, 6];
%! a(k) = bug54490 ();
%! assert (a, [5, 3]);
%! k = 2;
%! a = [5, 6];
%! [a(k)] = bug54490 ();
%! assert (a, [5, 3]);
%! clear -global k;  # cleanup after test