changeset 24440:f8bbaacefc33 stable

doc: Fix various inconsistencies in manual (bug #52712). * container.txi: Correct size of structure array in example. * var.txi: Fix example code for who which used non-existent option "-variables". * data.cc (Fcomplex): Use common syntax in docstring that a complex number is "a+bi". * error.cc (Fwarning), qz.cc (Fqz), setfield.m: Use 3-input form of @xref to generate a correct reference in PDF version of manual.
author Rik <rik@octave.org>
date Thu, 21 Dec 2017 03:38:39 -0800
parents 09c81c841b6f
children 9fbb5de78ec7 b9d482dd90f3
files doc/interpreter/container.txi doc/interpreter/var.txi libinterp/corefcn/data.cc libinterp/corefcn/error.cc libinterp/corefcn/qz.cc scripts/miscellaneous/setfield.m
diffstat 6 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/container.txi	Thu Dec 21 03:02:58 2017 -0800
+++ b/doc/interpreter/container.txi	Thu Dec 21 03:38:39 2017 -0800
@@ -257,7 +257,7 @@
 @end example
 
 @noindent
-which creates a 2-by-1 structure array with two fields.  Another way
+which creates a 1-by-2 structure array with two fields.  Another way
 to create a structure array is with the @code{struct} function
 (@pxref{Creating Structures}).  As previously, to print the value of
 the structure array, you can type its name:
--- a/doc/interpreter/var.txi	Thu Dec 21 03:02:58 2017 -0800
+++ b/doc/interpreter/var.txi	Thu Dec 21 03:38:39 2017 -0800
@@ -312,10 +312,10 @@
 @example
 @group
 str = "A random string";
-who -variables
-     @print{} *** local user variables:
-     @print{}
-     @print{} __nargin__  str
+who
+ @print{} Variables in the current scope:
+ @print{}
+ @print{} ans  str
 @end group
 @end example
 
--- a/libinterp/corefcn/data.cc	Thu Dec 21 03:02:58 2017 -0800
+++ b/libinterp/corefcn/data.cc	Thu Dec 21 03:38:39 2017 -0800
@@ -3360,9 +3360,9 @@
 @w{@code{@var{x} + 0i}}.
 
 With 2 real arguments, return the complex result
-@w{@code{@var{re} + @var{im}}}.
+@w{@code{@var{re} + @var{im}i}}.
 @code{complex} can often be more convenient than expressions such as
-@w{@code{a + i*b}}.
+@w{@code{a + b*i}}.
 For example:
 
 @example
--- a/libinterp/corefcn/error.cc	Thu Dec 21 03:02:58 2017 -0800
+++ b/libinterp/corefcn/error.cc	Thu Dec 21 03:38:39 2017 -0800
@@ -1439,7 +1439,7 @@
 The optional message identifier allows users to enable or disable
 warnings tagged by @var{id}.  A message identifier is of the form
 "NAMESPACE:WARNING-NAME".  Octave's own warnings use the
-@qcode{"Octave"} namespace (@pxref{XREFwarning_ids}).  The special
+@qcode{"Octave"} namespace (@pxref{XREFwarning_ids,,warning_ids}).  The special
 identifier @qcode{"all"} may be used to set the state of all warnings.
 
 If the first argument is @qcode{"on"} or @qcode{"off"},
--- a/libinterp/corefcn/qz.cc	Thu Dec 21 03:02:58 2017 -0800
+++ b/libinterp/corefcn/qz.cc	Thu Dec 21 03:38:39 2017 -0800
@@ -231,7 +231,7 @@
 @end enumerate
 
 Note: @code{qz} performs permutation balancing, but not scaling
-(@pxref{XREFbalance}), which may be lead to less accurate results than
+(@pxref{XREFbalance,,balance}), which may be lead to less accurate results than
 @code{eig}.  The order of output arguments was selected for compatibility with
 @sc{matlab}.
 @seealso{eig, balance, lu, chol, hess, qr, qzhess, schur, svd}
--- a/scripts/miscellaneous/setfield.m	Thu Dec 21 03:02:58 2017 -0800
+++ b/scripts/miscellaneous/setfield.m	Thu Dec 21 03:38:39 2017 -0800
@@ -46,7 +46,7 @@
 ## the space character.  Using arbitrary strings for field names is
 ## incompatible with @sc{matlab}, and this usage will emit a warning if the
 ## warning ID @code{Octave:language-extension} is enabled.
-## @xref{XREFwarning_ids}.
+## @xref{XREFwarning_ids,,warning_ids}.
 ##
 ## With the second calling form, set a field of a structure array.  The
 ## input @var{sidx} selects an element of the structure array, @var{field}