Mercurial > hg > octave-nkf
diff scripts/control/util/prompt.m @ 4462:3e48e60a1f8b
[project @ 2003-07-12 03:31:41 by jwe]
author | jwe |
---|---|
date | Sat, 12 Jul 2003 03:31:41 +0000 |
parents | 7923abdeb4e5 |
children | bdbee5282954 |
line wrap: on
line diff
--- a/scripts/control/util/prompt.m +++ b/scripts/control/util/prompt.m @@ -31,16 +31,16 @@ function prompt (str) - if(nargin > 1) - usage("prompt([str])"); - elseif(nargin == 0) + if (nargin > 1) + usage ("prompt ([str])"); + elseif (nargin == 0) str = "\n ---- Press a key to continue ---"; - elseif ( !isstr(str) ) - error("prompt: input must be a string"); + elseif (! isstr (str) ) + error ("prompt: input must be a string"); endif - disp(str); - fflush(stdout); - kbhit; + disp (str); + fflush (stdout); + kbhit (); endfunction