changeset 25215:7ca5f8c70879 stable

doc: Update docstring for warning(). * error.cc (Fwarning): Update docstring.
author Rik <rik@octave.org>
date Wed, 11 Apr 2018 11:19:18 -0700
parents 5cdd48b2d9ca
children b72972ab83f1
files libinterp/corefcn/error.cc
diffstat 1 files changed, 24 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc	Wed Apr 11 11:06:04 2018 -0700
+++ b/libinterp/corefcn/error.cc	Wed Apr 11 11:19:18 2018 -0700
@@ -1435,21 +1435,20 @@
 @deftypefnx {} {} warning ("error", @var{id})
 @deftypefnx {} {} warning ("query", @var{id})
 @deftypefnx {} {} warning (@var{state}, @var{id}, "local")
-@deftypefnx {} {} warning (@var{stin})
-@deftypefnx {} {@var{stout} =} warning (@dots{})
-@deftypefnx {} {@var{mode_st} =} warning (@var{state}, @var{mode})
+@deftypefnx {} {} warning (@var{warning_struct})
+@deftypefnx {} {@var{warning_struct} =} warning (@dots{})
+@deftypefnx {} {@var{mode_struct} =} warning (@var{state}, @var{mode})
 @deftypefnx {} {} warning (@var{mode_st})
 
-Display a warning message or control the behavior of Octave's warning
-system.
+Display a warning message or control the behavior of Octave's warning system.
 
-The first call form uses a template @var{template} and optional
-additional arguments to display a message on the @code{stderr} stream.
-The message is formatted using the same rules as the @code{printf} family
-of functions (@pxref{Formatted Output}) and prefixed by the character
-string @samp{warning: }.  You should use this function when you want to
-notify the user of an unusual condition, but only when it makes sense for
-your program to go on.  For example:
+The first call form uses a template @var{template} and optional additional
+arguments to display a message on the @code{stderr} stream.  The message is
+formatted using the same rules as the @code{printf} family of functions
+(@pxref{Formatted Output}) and prefixed by the character string
+@w{@samp{warning: }}.  You should use this function when you want to notify the
+user of an unusual condition, but only when it makes sense for your program to
+go on.  For example:
 
 @example
 @group
@@ -1475,9 +1474,9 @@
 @qcode{"off"}, @qcode{"error"}, or @qcode{"query"}) followed by an optional
 warning identifier @var{id} or @qcode{"all"} (default).
 
-The optional output argument @var{stout} is a structure or structure array
-with fields @qcode{"state"} and @qcode{"identifier"}.  The @var{state} argument
-may have the following values:
+The optional output argument @var{warning_struct} is a structure or structure
+array with fields @qcode{"state"} and @qcode{"identifier"}.  The @var{state}
+argument may have the following values:
 
 @table @asis
 @item @qcode{"on"}|@qcode{"off"}:
@@ -1492,10 +1491,10 @@
 Return the current state of warnings identified by @var{id}.
 @end table
 
-A structure or structure array @var{stin}, with fields @qcode{"state"} and
-@qcode{"identifier"}, may be passed to achieve equivalent results.  The
-following example shows how to temporarily disable a warning and then restore
-its original state:
+A structure or structure array @var{warning_struct}, with fields
+@qcode{"state"} and @qcode{"identifier"}, may be given as an input to achieve
+equivalent results.  The following example shows how to temporarily disable a
+warning and then restore its original state:
 
 @example
 @group
@@ -1534,12 +1533,12 @@
 In this case the @var{state} argument may only be @qcode{"on"} or
 @qcode{"off"}.
 
-Implementation Note: For compatibility with @sc{matlab}, escape
-sequences in @var{template} (e.g., @qcode{"@xbackslashchar{}n"} =>
-newline) are processed regardless of whether @var{template} has been defined
-with single quotes, as long as there are two or more input arguments.  To
-disable escape sequence expansion use a second backslash before the sequence
-(e.g., @qcode{"@xbackslashchar{}@xbackslashchar{}n"}) or use the
+Implementation Note: For compatibility with @sc{matlab}, escape sequences in
+@var{template} (e.g., @qcode{"@xbackslashchar{}n"} => newline) are processed
+regardless of whether @var{template} has been defined with single quotes, as
+long as there are two or more input arguments.  To disable escape sequence
+expansion use a second backslash before the sequence (e.g.,
+@qcode{"@xbackslashchar{}@xbackslashchar{}n"}) or use the
 @code{regexptranslate} function.
 @seealso{warning_ids, lastwarn, error}
 @end deftypefn */)