Mercurial > jwe > octave
changeset 24987:a895967fd5a7 stable
doc: grammarcheck manual (*.txi) ahead of 4.4 release.
* expr.txi, external.txi, func.txi, plot.txi, gammainc.m:
Use Octave docstring conventions.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 23 Mar 2018 12:38:00 -0700 |
parents | 0b9e7fcaab91 |
children | a70fa26c74f8 15d2f32db174 |
files | doc/interpreter/expr.txi doc/interpreter/external.txi doc/interpreter/func.txi doc/interpreter/plot.txi scripts/specfun/gammainc.m |
diffstat | 5 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/expr.txi Fri Mar 23 10:29:45 2018 -0700 +++ b/doc/interpreter/expr.txi Fri Mar 23 12:38:00 2018 -0700 @@ -141,10 +141,10 @@ For the ordinary and most common case, the number of indices (@code{nidx = numel (@var{idx})}) matches the number of dimensions @samp{nd}. -In this case, each element of @var{idx} corresponds to its respective dimension, -i.e., @code{@var{idx}(1)} refers to dimension 1, @code{@var{idx}(2)} refers to -dimension 2, etc. If @w{@code{nidx < nd}}, and every index is less than the -size of the array in the @math{i^{th}} dimension +In this case, each element of @var{idx} corresponds to its respective +dimension, i.e., @code{@var{idx}(1)} refers to dimension 1, +@code{@var{idx}(2)} refers to dimension 2, etc. If @w{@code{nidx < nd}}, and +every index is less than the size of the array in the @math{i^{th}} dimension (@code{@var{idx}(i) < size (@var{array}, i)}), then the index expression is padded with @w{@code{nd - nidx}} trailing singleton dimensions. If @w{@code{nidx < nd}} but one of the indices @code{@var{idx}(i)} is outside the @@ -527,6 +527,7 @@ actions, such as in the following example: @cindex figure deletefcn + @example @group function mydeletefcn (h, ~, msg) @@ -539,10 +540,11 @@ @end example @noindent -The above will print "Bye!" to the terminal upon the closing (deleting) of the -figure. There are many graphics property actions for which a callback function -may be assigned, including, @code{buttondownfcn}, @code{windowscrollwheelfcn}, -@code{createfcn}, @code{deletefcn}, @code{keypressfcn}, etc. +The above will print @qcode{"Bye!"} to the terminal upon the closing +(deleting) of the figure. There are many graphics property actions for which +a callback function may be assigned, including, @code{buttondownfcn}, +@code{windowscrollwheelfcn}, @code{createfcn}, @code{deletefcn}, +@code{keypressfcn}, etc. Note that the @samp{@@} character also plays a role in defining class functions, i.e., methods, but not as a syntactical element. Rather it begins a
--- a/doc/interpreter/external.txi Fri Mar 23 10:29:45 2018 -0700 +++ b/doc/interpreter/external.txi Fri Mar 23 12:38:00 2018 -0700 @@ -609,7 +609,7 @@ will not overflow. Extreme care is also required when using the @code{elem} method or the -@qcode{()} operator which perform essentially the same function. The reason is +@code{()} operator which perform essentially the same function. The reason is that if a sparse object is non-const, then Octave will assume that a request for a zero element in a sparse matrix is in fact a request to create this element so it can be filled. Therefore, a piece of code like @@ -1085,7 +1085,7 @@ There are several functions within Octave that can be useful for the purposes of parameter checking. These include the methods of the @code{octave_value} -class like @code{is_real_matrix}, @code{is_numeric_type}, etc. (See +class like @code{is_real_matrix}, @code{is_numeric_type}, etc. (see @file{ov.h}). Often, with a knowledge of the Octave m-file language, you can guess at what the corresponding C++ routine will. In addition there are some more specialized input validation functions of which a few are demonstrated
--- a/doc/interpreter/func.txi Fri Mar 23 10:29:45 2018 -0700 +++ b/doc/interpreter/func.txi Fri Mar 23 12:38:00 2018 -0700 @@ -670,7 +670,7 @@ without adding extra logic to avoid printing the message if the vector does contain a nonzero element. -@deftypefn {Keyword} {} return +@deftypefn {} {} return When Octave encounters the keyword @code{return} inside a function or script, it returns control to the caller immediately. At the top level, the return statement is ignored. A @code{return} statement is assumed
--- a/doc/interpreter/plot.txi Fri Mar 23 10:29:45 2018 -0700 +++ b/doc/interpreter/plot.txi Fri Mar 23 12:38:00 2018 -0700 @@ -719,7 +719,7 @@ display and is equivalent to @qcode{"none"}. Note that Octave does not parse or validate the text strings when in @qcode{"latex"} mode---it is the responsibility of the programmer to generate valid strings which may include -wrapping sections that should appear in Math mode with '$' characters. +wrapping sections that should appear in Math mode with @qcode{'$'} characters. The @qcode{"tex"} option implements a subset of @TeX{} functionality when rendering text. This allows the insertion of special glyphs such as Greek @@ -1893,8 +1893,8 @@ @end example @noindent -where at the moment that the plot is deleted, the message "Window Deleted" will -be displayed. +where at the moment that the plot is deleted, the message +@qcode{"Window Deleted"} will be displayed. Additional user arguments can be passed to callback functions, and will be passed after the two default arguments. For example:
--- a/scripts/specfun/gammainc.m Fri Mar 23 10:29:45 2018 -0700 +++ b/scripts/specfun/gammainc.m Fri Mar 23 12:38:00 2018 -0700 @@ -72,7 +72,7 @@ ## ## References: ## -## @nospell{M. Abramowitz and I. Stegun}, +## @nospell{M. Abramowitz and I.A. Stegun}, ## @cite{Handbook of mathematical functions}, ## @nospell{Dover publications, Inc.}, 1972. ##