Mercurial > octave
diff libinterp/corefcn/pr-output.cc @ 19232:97eea1e2d9ff gui-release
pr-output.cc: fix default chars for "format +" for Matlab compatibility
* pr-output.cc: restore default chars "+- " for Matlab compatibility.
(Regression from cset 0e28461651f2, see also bug #43351)
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Tue, 07 Oct 2014 14:37:17 +0200 |
parents | 812162c34a93 |
children | 6d8d5d9f2264 7467c3e773fd |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Mon Oct 06 21:52:48 2014 +0200 +++ b/libinterp/corefcn/pr-output.cc Tue Oct 07 14:37:17 2014 +0200 @@ -85,7 +85,7 @@ static bool plus_format = false; // First char for > 0, second for < 0, third for == 0. -static std::string plus_format_chars = "+ "; +static std::string plus_format_chars = "+- "; // TRUE means always print in a rational approximation static bool rat_format = false; @@ -3746,7 +3746,7 @@ } } else - plus_format_chars = "+ "; + plus_format_chars = "+- "; init_format_state (); plus_format = true; @@ -3886,13 +3886,14 @@ @itemx + @var{chars}\n\ @itemx plus\n\ @itemx plus @var{chars}\n\ -Print a @samp{+} symbol for nonzero matrix elements and a space for zero\n\ -matrix elements. This format can be very useful for examining the\n\ -structure of a large sparse matrix.\n\ +Print a @samp{+} symbol for matrix elements greater than zero, a\n\ +@samp{-} symbol for elements less than zero and a space for zero matrix\n\ +elements. This format can be very useful for examining the structure\n\ +of a large sparse matrix.\n\ \n\ The optional argument @var{chars} specifies a list of 3 characters to use\n\ for printing values greater than zero, less than zero and equal to zero.\n\ -For example, with the @samp{+ \"+-.\"} format, @code{[1, 0, -1; -1, 0, 1]}\n\ +For example, with the @samp{\"+\" \"+-.\"} format, @code{[1, 0, -1; -1, 0, 1]}\n\ is displayed as\n\ \n\ @example\n\