Mercurial > hg > octave-max
changeset 961:b0bb56a7ddcc
[project @ 1994-12-09 05:19:59 by jwe]
author | jwe |
---|---|
date | Fri, 09 Dec 1994 05:19:59 +0000 |
parents | a2545afe2093 |
children | 22277a269bbb |
files | src/tc-rep.cc |
diffstat | 1 files changed, 42 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-rep.cc +++ b/src/tc-rep.cc @@ -1667,63 +1667,60 @@ if (error_state) return; - if (print) - { - ostrstream output_buf; + ostrstream output_buf; - switch (type_tag) - { - case scalar_constant: - octave_print_internal (output_buf, scalar); - break; + switch (type_tag) + { + case scalar_constant: + octave_print_internal (output_buf, scalar); + break; + + case matrix_constant: + octave_print_internal (output_buf, *matrix); + break; - case matrix_constant: - octave_print_internal (output_buf, *matrix); - break; - - case complex_scalar_constant: - octave_print_internal (output_buf, *complex_scalar); - break; + case complex_scalar_constant: + octave_print_internal (output_buf, *complex_scalar); + break; - case complex_matrix_constant: - octave_print_internal (output_buf, *complex_matrix); - break; + case complex_matrix_constant: + octave_print_internal (output_buf, *complex_matrix); + break; - case string_constant: - output_buf << string << "\n"; - break; + case string_constant: + output_buf << string << "\n"; + break; - case range_constant: - octave_print_internal (output_buf, *range); - break; + case range_constant: + octave_print_internal (output_buf, *range); + break; - case map_constant: + case map_constant: + { + output_buf << "<structure"; + int first = 1; + for (Pix p = a_map->first (); p != 0; a_map->next (p)) { - output_buf << "<structure"; - int first = 1; - for (Pix p = a_map->first (); p != 0; a_map->next (p)) + if (first) { - if (first) - { - output_buf << ":"; - first = 0; - } - output_buf << " " << a_map->key (p); + output_buf << ":"; + first = 0; } - output_buf << ">\n"; + output_buf << " " << a_map->key (p); } - break; + output_buf << ">\n"; + } + break; - case unknown_constant: - case magic_colon: - case all_va_args: - panic_impossible (); - break; - } + case unknown_constant: + case magic_colon: + case all_va_args: + panic_impossible (); + break; + } - output_buf << ends; - maybe_page_output (output_buf); - } + output_buf << ends; + maybe_page_output (output_buf); } void