Mercurial > hg > octave-nkf
diff src/pr-output.cc @ 2664:9ccca1037db3
[project @ 1997-02-08 23:17:04 by jwe]
author | jwe |
---|---|
date | Sat, 08 Feb 1997 23:17:05 +0000 |
parents | 3723512a827a |
children | 9aeba8e006a4 |
line wrap: on
line diff
--- 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)