Mercurial > hg > octave-nkf
changeset 2664:9ccca1037db3
[project @ 1997-02-08 23:17:04 by jwe]
author | jwe |
---|---|
date | Sat, 08 Feb 1997 23:17:05 +0000 |
parents | 00b2eff19bf5 |
children | 02f298ddf9f6 |
files | src/ChangeLog src/pr-output.cc |
diffstat | 2 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 8 17:16:09 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pr-output.cc (octave_print_internal): Print a new line for empty + string matrices. + Wed Feb 5 14:30:44 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * oct-stream.cc (scanf_format_list::process_conversion): Accept
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -1489,19 +1489,24 @@ if (pr_as_read_syntax && nstr > 1) os << "[ "; - for (int i = 0; i < nstr; i++) + if (nstr == 0) + os << "\n"; + else { - string row = chm.row_as_string (i); - - if (pr_as_read_syntax) + for (int i = 0; i < nstr; i++) { - os << "\"" << undo_string_escapes (row) << "\""; + string row = chm.row_as_string (i); + + if (pr_as_read_syntax) + { + os << "\"" << undo_string_escapes (row) << "\""; - if (i < nstr - 1) - os << "; "; + if (i < nstr - 1) + os << "; "; + } + else + os << row << "\n"; } - else - os << row << "\n"; } if (pr_as_read_syntax && nstr > 1)