comparison libinterp/corefcn/pr-output.cc @ 19447:6d8d5d9f2264

maint: periodic merge of gui-release to default
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 15 Oct 2014 11:54:04 -0400
parents ec10705dbd83 97eea1e2d9ff
children 25f535b90e52
comparison
equal deleted inserted replaced
19444:79d4783a9978 19447:6d8d5d9f2264
83 83
84 // TRUE means print plus sign for nonzero, blank for zero. 84 // TRUE means print plus sign for nonzero, blank for zero.
85 static bool plus_format = false; 85 static bool plus_format = false;
86 86
87 // First char for > 0, second for < 0, third for == 0. 87 // First char for > 0, second for < 0, third for == 0.
88 static std::string plus_format_chars = "+ "; 88 static std::string plus_format_chars = "+- ";
89 89
90 // TRUE means always print in a rational approximation 90 // TRUE means always print in a rational approximation
91 static bool rat_format = false; 91 static bool rat_format = false;
92 92
93 // Used to force the length of the rational approximation string for Frats 93 // Used to force the length of the rational approximation string for Frats
3813 error ("format: invalid option for plus format"); 3813 error ("format: invalid option for plus format");
3814 return; 3814 return;
3815 } 3815 }
3816 } 3816 }
3817 else 3817 else
3818 plus_format_chars = "+ "; 3818 plus_format_chars = "+- ";
3819 3819
3820 init_format_state (); 3820 init_format_state ();
3821 plus_format = true; 3821 plus_format = true;
3822 } 3822 }
3823 else if (arg == "rat") 3823 else if (arg == "rat")
3962 @table @code\n\ 3962 @table @code\n\
3963 @item \"+\"\n\ 3963 @item \"+\"\n\
3964 @itemx \"+\" @var{chars}\n\ 3964 @itemx \"+\" @var{chars}\n\
3965 @itemx plus\n\ 3965 @itemx plus\n\
3966 @itemx plus @var{chars}\n\ 3966 @itemx plus @var{chars}\n\
3967 Print a @samp{+} symbol for nonzero matrix elements and a space for zero\n\ 3967 Print a @samp{+} symbol for matrix elements greater than zero, a\n\
3968 matrix elements. This format can be very useful for examining the\n\ 3968 @samp{-} symbol for elements less than zero and a space for zero matrix\n\
3969 structure of a large sparse matrix.\n\ 3969 elements. This format can be very useful for examining the structure\n\
3970 of a large sparse matrix.\n\
3970 \n\ 3971 \n\
3971 The optional argument @var{chars} specifies a list of 3 characters to use\n\ 3972 The optional argument @var{chars} specifies a list of 3 characters to use\n\
3972 for printing values greater than zero, less than zero and equal to zero.\n\ 3973 for printing values greater than zero, less than zero and equal to zero.\n\
3973 For example, with the @samp{+ \"+-.\"} format, @code{[1, 0, -1; -1, 0, 1]}\n\ 3974 For example, with the @samp{\"+\" \"+-.\"} format, @code{[1, 0, -1; -1, 0, 1]}\n\
3974 is displayed as\n\ 3975 is displayed as\n\
3975 \n\ 3976 \n\
3976 @example\n\ 3977 @example\n\
3977 @group\n\ 3978 @group\n\
3978 ans =\n\ 3979 ans =\n\