Mercurial > octave-dspies
comparison libinterp/corefcn/input.cc @ 18674:7bccc182e2f7 stable
doc: Update pause documentation and add seealso links between related functions.
* input.cc (Finput): Put first sentence description on its own line. Add
seealso links.
* input.cc (Fyes_or_no):Put first sentence description on its own line. Add
seealso links.
* input.cc (Fkeyboard): Add seealso link to dbstop.
* input.cc (Fkeyboard): Add seealso link to dbstop.
* sysdep.cc (Fkbhit): Add seealso link to pause.
* sysdep.cc (Fpause): Rewrite docstring. Add seealso links.
* sysdep.cc (Fsleep): Add seealso links to usleep, pause.
* sysdep.cc (Fusleep): Add seealso links to sleep, pause.
* sysdep.cc (Fhave_window_system): Correct bad phrasing in docstring.
* listdlg.m: Add seealso link to menu
* menu.m: Add seealso link to listdlg.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 24 Apr 2014 20:23:48 -0700 |
parents | 708173343c50 |
children | 1a5dabbaa559 |
comparison
equal
deleted
inserted
replaced
18672:3994a1c2b994 | 18674:7bccc182e2f7 |
---|---|
729 | 729 |
730 DEFUN (input, args, nargout, | 730 DEFUN (input, args, nargout, |
731 "-*- texinfo -*-\n\ | 731 "-*- texinfo -*-\n\ |
732 @deftypefn {Built-in Function} {@var{ans} =} input (@var{prompt})\n\ | 732 @deftypefn {Built-in Function} {@var{ans} =} input (@var{prompt})\n\ |
733 @deftypefnx {Built-in Function} {@var{ans} =} input (@var{prompt}, \"s\")\n\ | 733 @deftypefnx {Built-in Function} {@var{ans} =} input (@var{prompt}, \"s\")\n\ |
734 Print a prompt and wait for user input. For example,\n\ | 734 Print @var{prompt} and wait for user input.\n\ |
735 \n\ | |
736 For example,\n\ | |
735 \n\ | 737 \n\ |
736 @example\n\ | 738 @example\n\ |
737 input (\"Pick a number, any number! \")\n\ | 739 input (\"Pick a number, any number! \")\n\ |
738 @end example\n\ | 740 @end example\n\ |
739 \n\ | 741 \n\ |
759 \n\ | 761 \n\ |
760 Because there may be output waiting to be displayed by the pager, it is\n\ | 762 Because there may be output waiting to be displayed by the pager, it is\n\ |
761 a good idea to always call @code{fflush (stdout)} before calling\n\ | 763 a good idea to always call @code{fflush (stdout)} before calling\n\ |
762 @code{input}. This will ensure that all pending output is written to\n\ | 764 @code{input}. This will ensure that all pending output is written to\n\ |
763 the screen before your prompt.\n\ | 765 the screen before your prompt.\n\ |
764 @seealso{yes_or_no, kbhit}\n\ | 766 @seealso{yes_or_no, kbhit, pause, menu, listdlg}\n\ |
765 @end deftypefn") | 767 @end deftypefn") |
766 { | 768 { |
767 octave_value_list retval; | 769 octave_value_list retval; |
768 | 770 |
769 int nargin = args.length (); | 771 int nargin = args.length (); |
797 } | 799 } |
798 | 800 |
799 DEFUN (yes_or_no, args, , | 801 DEFUN (yes_or_no, args, , |
800 "-*- texinfo -*-\n\ | 802 "-*- texinfo -*-\n\ |
801 @deftypefn {Built-in Function} {@var{ans} =} yes_or_no (\"@var{prompt}\")\n\ | 803 @deftypefn {Built-in Function} {@var{ans} =} yes_or_no (\"@var{prompt}\")\n\ |
802 Ask the user a yes-or-no question. Return logical true if the answer is yes\n\ | 804 Ask the user a yes-or-no question.\n\ |
803 or false if the answer is no. Takes one argument, @var{prompt}, which is\n\ | 805 \n\ |
804 the string to display when asking the question. @var{prompt} should end in\n\ | 806 Return logical true if the answer is yes or false if the answer is no.\n\ |
805 a space; @code{yes-or-no} adds the string @samp{(yes or no) } to it. The\n\ | 807 Takes one argument, @var{prompt}, which is the string to display when asking\n\ |
806 user must confirm the answer with @key{RET} and can edit it until it has\n\ | 808 the question. @var{prompt} should end in a space; @code{yes-or-no} adds the\n\ |
807 been confirmed.\n\ | 809 string @samp{(yes or no) } to it. The user must confirm the answer with\n\ |
810 @key{RET} and can edit it until it has been confirmed.\n\ | |
808 @seealso{input}\n\ | 811 @seealso{input}\n\ |
809 @end deftypefn") | 812 @end deftypefn") |
810 { | 813 { |
811 octave_value retval; | 814 octave_value retval; |
812 | 815 |
886 prompt and return to normal execution type @samp{return} or @samp{dbcont}.\n\ | 889 prompt and return to normal execution type @samp{return} or @samp{dbcont}.\n\ |
887 The @code{keyboard} function does not return an exit status.\n\ | 890 The @code{keyboard} function does not return an exit status.\n\ |
888 \n\ | 891 \n\ |
889 If @code{keyboard} is invoked without arguments, a default prompt of\n\ | 892 If @code{keyboard} is invoked without arguments, a default prompt of\n\ |
890 @samp{debug> } is used.\n\ | 893 @samp{debug> } is used.\n\ |
891 @seealso{dbcont, dbquit}\n\ | 894 @seealso{dbstop, dbcont, dbquit}\n\ |
892 @end deftypefn") | 895 @end deftypefn") |
893 { | 896 { |
894 octave_value_list retval; | 897 octave_value_list retval; |
895 | 898 |
896 int nargin = args.length (); | 899 int nargin = args.length (); |