# HG changeset patch # User Rik # Date 1360685626 28800 # Node ID 119ce9f5e1a34fa0b95cc4af9e47f56fa93590cd # Parent a59cb5c06d791caa782bcb4e2f89e446b3573de1 doc: Add seealso links between input, yes_or_no, kbhit. * libinterp/interpfcn/input.cc(Finput): Add seealso link to yes_or_no, kbhit. Add return argument to function documenation. * libinterp/interpfcn/input.cc(Fyes_or_no): Add seealso link to input. Redo docstring to make it more modern. * libinterp/interpfcn/sysdep.cc(kbhit): Add seealso link to input. Add second calling form of kbhit to documentation. diff -r a59cb5c06d79 -r 119ce9f5e1a3 libinterp/interpfcn/input.cc --- a/libinterp/interpfcn/input.cc Tue Feb 12 07:43:59 2013 -0800 +++ b/libinterp/interpfcn/input.cc Tue Feb 12 08:13:46 2013 -0800 @@ -843,8 +843,8 @@ DEFUN (input, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} input (@var{prompt})\n\ -@deftypefnx {Built-in Function} {} input (@var{prompt}, \"s\")\n\ +@deftypefn {Built-in Function} {@var{ans} =} input (@var{prompt})\n\ +@deftypefnx {Built-in Function} {@var{ans} =} input (@var{prompt}, \"s\")\n\ Print a prompt and wait for user input. For example,\n\ \n\ @example\n\ @@ -874,7 +874,8 @@ Because there may be output waiting to be displayed by the pager, it is\n\ a good idea to always call @code{fflush (stdout)} before calling\n\ @code{input}. This will ensure that all pending output is written to\n\ -the screen before your prompt. @xref{Input and Output}.\n\ +the screen before your prompt.\n\ +@seealso{yes_or_no, kbhit}\n\ @end deftypefn") { octave_value_list retval; @@ -909,12 +910,14 @@ DEFUN (yes_or_no, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} yes_or_no (@var{prompt})\n\ -Ask the user a yes-or-no question. Return 1 if the answer is yes.\n\ -Takes one argument, which is the string to display to ask the\n\ -question. It should end in a space; @samp{yes-or-no-p} adds\n\ -@samp{(yes or no) } to it. The user must confirm the answer with\n\ -RET and can edit it until it has been confirmed.\n\ +@deftypefn {Built-in Function} {@var{ans} =} yes_or_no (\"@var{prompt}\")\n\ +Ask the user a yes-or-no question. Return logical true if the answer is yes\n\ +or false if the answer is no. Takes one argument, @var{prompt}, which is\n\ +the string to display when asking the question. @var{prompt} should end in\n\ +a space; @code{yes-or-no} adds the string @samp{(yes or no) } to it. The\n\ +user must confirm the answer with @key{RET} and can edit it until it has\n\ +been confirmed.\n\ +@seealso{input}\n\ @end deftypefn") { octave_value retval; @@ -986,7 +989,7 @@ DEFUN (keyboard, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} keyboard ()\n\ -@deftypefnx {Built-in Function} {} keyboard (@var{prompt})\n\ +@deftypefnx {Built-in Function} {} keyboard (\"@var{prompt}\")\n\ This function is normally used for simple debugging. When the\n\ @code{keyboard} function is executed, Octave prints a prompt and waits\n\ for user input. The input strings are then evaluated and the results\n\ diff -r a59cb5c06d79 -r 119ce9f5e1a3 libinterp/interpfcn/sysdep.cc --- a/libinterp/interpfcn/sysdep.cc Tue Feb 12 07:43:59 2013 -0800 +++ b/libinterp/interpfcn/sysdep.cc Tue Feb 12 08:13:46 2013 -0800 @@ -619,8 +619,9 @@ DEFUN (kbhit, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} kbhit ()\n\ -Read a single keystroke from the keyboard. If called with one\n\ +@deftypefn {Built-in Function} {} kbhit ()\n\ +@deftypefnx {Built-in Function} {} kbhit (1)\n\ +Read a single keystroke from the keyboard. If called with an\n\ argument, don't wait for a keypress. For example,\n\ \n\ @example\n\ @@ -636,8 +637,9 @@ @end example\n\ \n\ @noindent\n\ -identical to the above example, but don't wait for a keypress,\n\ +is identical to the above example, but doesn't wait for a keypress,\n\ returning the empty string if no key is available.\n\ +@seealso{input}\n\ @end deftypefn") { octave_value retval;