Mercurial > hg > octave-terminal
changeset 1579:972ce8b5a757
[project @ 1995-10-19 06:39:35 by jwe]
author | jwe |
---|---|
date | Thu, 19 Oct 1995 06:39:35 +0000 |
parents | caa181489200 |
children | 0c49e5e8dd5b |
files | src/sysdep.cc |
diffstat | 1 files changed, 17 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -590,34 +590,27 @@ return retval; } - if (interactive) + if (nargin == 1) { - switch (nargin) - { - case 1: - { - double dval = args(0).double_value (); + double dval = args(0).double_value (); - if (! error_state) - { - if (xisnan (dval)) - warning ("pause: NaN is an invalid delay"); - else - { - int delay = NINT (dval); - if (delay > 0) - sleep (delay); - } - } - } - break; - - default: - if (kbhit () == EOF) - clean_up_and_exit (0); - break; + if (! error_state) + { + if (xisnan (dval)) + warning ("pause: NaN is an invalid delay"); + else + { + int delay = NINT (dval); + if (delay > 0) + sleep (delay); + } } } + else + { + if (kbhit () == EOF) + clean_up_and_exit (0); + } return retval; }