Mercurial > hg > octave-lyh
changeset 16766:7268845c0a1e
avoid backquote in error messages, some uses in doc strings
* libinterp/corefcn/quadcc.cc, libinterp/interpfcn/file-io.cc,
libinterp/octave-value/ov-java.cc, scripts/image/colormap.m,
scripts/image/rgbplot.m, scripts/miscellaneous/xor.m,
scripts/plot/print.m, scripts/special-matrix/gallery.m,
scripts/statistics/base/quantile.m, scripts/strings/strsplit.m:
Use ' instead of ` in error messages.
Don't use sprintf unnecessarily in error messages.
Use @code or @samp instead of `' in doc strings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 18 Jun 2013 06:39:01 -0400 |
parents | 80b9a9e1c965 |
children | 47fbafc6e8e2 |
files | libinterp/corefcn/quadcc.cc libinterp/interpfcn/file-io.cc libinterp/octave-value/ov-java.cc scripts/image/colormap.m scripts/image/rgbplot.m scripts/miscellaneous/xor.m scripts/plot/print.m scripts/special-matrix/gallery.m scripts/statistics/base/quantile.m scripts/strings/strsplit.m |
diffstat | 10 files changed, 20 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/quadcc.cc +++ b/libinterp/corefcn/quadcc.cc @@ -1495,7 +1495,7 @@ @end example\n\ \n\ @noindent\n\ -which uses the element-by-element `dot' form for all operators.\n\ +which uses the element-by-element ``dot'' form for all operators.\n\ \n\ @var{a} and @var{b} are the lower and upper limits of integration. Either\n\ or both limits may be infinite. @code{quadcc} handles an inifinite limit\n\
--- a/libinterp/interpfcn/file-io.cc +++ b/libinterp/interpfcn/file-io.cc @@ -1139,7 +1139,7 @@ \n\ In the second form, read from @var{fid} according to @var{template},\n\ with each conversion specifier in @var{template} corresponding to a\n\ -single scalar return value. This form is more `C-like', and also\n\ +single scalar return value. This form is more ``C-like'', and also\n\ compatible with previous versions of Octave. The number of successful\n\ conversions is returned in @var{count}\n\ @ifclear OCTAVE_MANUAL\n\
--- a/libinterp/octave-value/ov-java.cc +++ b/libinterp/octave-value/ov-java.cc @@ -1321,7 +1321,7 @@ else { found = 0; - error ("cannot convert matrix of type `%s'", val.class_name ().c_str ()); + error ("cannot convert matrix of type '%s'", val.class_name ().c_str ()); } } else if (val.is_cellstr ())
--- a/scripts/image/colormap.m +++ b/scripts/image/colormap.m @@ -35,8 +35,8 @@ ## @code{jet} map with 64 entries). The default colormap is returned. ## ## @code{colormap ("list")} returns a cell array with all the available -## colormaps. The options `register' and `unregister' will add or remove the -## colormap @var{name} to it. +## colormaps. The options @code{"register"} and @code{"unregister"} +## will add or remove the colormap @var{name} to it. ## ## With no arguments, @code{colormap} returns the current color map. ## @seealso{jet}
--- a/scripts/image/rgbplot.m +++ b/scripts/image/rgbplot.m @@ -65,7 +65,7 @@ set (gca, 'ytick', []); colormap (cmap); otherwise - error ("rgbplot: unknown style `%s'", style); + error ("rgbplot: unknown style '%s'", style); endswitch xlabel ("color index"); @@ -88,5 +88,5 @@ %!error rgbplot (1,2) %!error <CMAP must be a valid colormap> rgbplot ({0 1 0}) %!error <STYLE must be a string> rgbplot ([0 1 0], 2) -%!error <unknown style `nostyle'> rgbplot ([0 1 0], "nostyle") +%!error <unknown style 'nostyle'> rgbplot ([0 1 0], "nostyle")
--- a/scripts/miscellaneous/xor.m +++ b/scripts/miscellaneous/xor.m @@ -18,7 +18,7 @@ ## -*- texinfo -*- ## @deftypefn {Mapping Function} {@var{z} =} xor (@var{x}, @var{y}) -## Return the `exclusive or' of the entries of @var{x} and @var{y}. +## Return the @dfn{exclusive or} of the entries of @var{x} and @var{y}. ## For boolean expressions @var{x} and @var{y}, ## @code{xor (@var{x}, @var{y})} is true if and only if one of @var{x} or ## @var{y} is true. Otherwise, for @var{x} and @var{y} both true or both
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -199,7 +199,7 @@ ## Produces pdf output from eps ## @end table ## -## For a complete list, type `system ("gs -h")' to see what formats +## For a complete list, type @samp{system ("gs -h")} to see what formats ## and devices are available. ## ## When Ghostscript output is sent to a printer the size is determined
--- a/scripts/special-matrix/gallery.m +++ b/scripts/special-matrix/gallery.m @@ -532,7 +532,7 @@ case (0), # do nothing case (1), n = n + 1; otherwise - error ("gallery: unknown K `%d' for chebspec matrix.", k); + error ("gallery: unknown K '%d' for chebspec matrix.", k); endswitch n = n-1; @@ -839,7 +839,7 @@ A = eye (n) + theta*P; else - error ("gallery: unknown estimator K `%d' for condex matrix.", k); + error ("gallery: unknown estimator K '%d' for condex matrix.", k); endif ## Pad out with identity as necessary. @@ -999,7 +999,7 @@ A = toeplitz (c, [1 1 zeros(1,n-2)]); otherwise - error ("gallery: unknown K `%d' for dramadah matrix.", k); + error ("gallery: unknown K '%d' for dramadah matrix.", k); endswitch endfunction @@ -1827,7 +1827,7 @@ Q = cos (m); otherwise - error ("gallery: unknown K `%d' for orthog matrix.", k); + error ("gallery: unknown K '%d' for orthog matrix.", k); endswitch endfunction @@ -2006,7 +2006,7 @@ case (2), A = 2*floor ( rand(m, n) + 0.5) -1; # {-1, 1} case (3), A = round (3*rand(m, n) - 1.5); # {-1, 0, 1} otherwise - error ("gallery: unknown K `%d' for smoke matrix.", k); + error ("gallery: unknown K '%d' for smoke matrix.", k); endswitch endfunction @@ -2097,7 +2097,7 @@ rand ("uniform"); sigma = exp (-rand (p, 1) * log (kappa)); otherwise - error ("gallery: unknown MODE `%d' for randsvd matrix.", mode); + error ("gallery: unknown MODE '%d' for randsvd matrix.", mode); endswitch ## Convert to diagonal matrix of singular values. @@ -2616,7 +2616,7 @@ A = diag (abs (-m:m)) + E + E'; else - error ("gallery: unknown N `%d' for wilk matrix.", n); + error ("gallery: unknown N '%d' for wilk matrix.", n); endif endfunction
--- a/scripts/statistics/base/quantile.m +++ b/scripts/statistics/base/quantile.m @@ -308,8 +308,7 @@ ## quantiles, @var{q} (the inverse of the cdf), for the sample, @var{x}. ## ## The optional input, @var{method}, refers to nine methods available in R -## (http://www.r-project.org/). The default is @var{method} = 7. For more -## detail, see `help quantile'. +## (http://www.r-project.org/). The default is @var{method} = 7. ## @seealso{prctile, quantile, statistics} ## Author: Ben Abbott <bpabbott@mac.com>
--- a/scripts/strings/strsplit.m +++ b/scripts/strings/strsplit.m @@ -152,7 +152,7 @@ args.(lower(params{n})) = params{n+1}; elseif (ischar (varargin{n})) error ("strsplit:invalid_parameter_name", - sprintf ("strsplit: Invalid parameter name, `%s'", varargin{n})) + "strsplit: invalid parameter name, '%s'", varargin{n}); else print_usage (); endif @@ -207,8 +207,8 @@ endif [result, ~, ~, ~, matches] = regexp (str, del, "split"); else - error ("strsplit:invalid_delimitertype", - sprintf ("strsplit: Invalid DELIMITERTYPE")) + error ("strsplit:invalid_delimitertype", + "strsplit: Invalid DELIMITERTYPE"); endif endfunction