Mercurial > hg > octave-lyh
diff src/ov-cs-list.cc @ 7531:c9a476b1e664
correctly set ans for cs-lists and simplify printing them
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2008 02:16:32 -0500 |
parents | a1dbe9d80eee |
children | 7e0f36dfefbe |
line wrap: on
line diff
--- a/src/ov-cs-list.cc +++ b/src/ov-cs-list.cc @@ -49,50 +49,6 @@ lst(i) = c(i); } -void -octave_cs_list::print (std::ostream& os, bool) const -{ - print_raw (os); -} - -void -octave_cs_list::print_raw (std::ostream& os, bool) const -{ - unwind_protect::begin_frame ("octave_cs_list_print"); - - octave_idx_type n = lst.length (); - - if (n > 0) - { - indent (os); - os << "(,"; - newline (os); - - increment_indent_level (); - - for (octave_idx_type i = 0; i < n; i++) - { - std::ostringstream buf; - buf << "[" << i+1 << "]"; - - octave_value val = lst(i); - - val.print_with_name (os, buf.str ()); - } - - decrement_indent_level (); - - indent (os); - os << ",)"; - } - else - os << "(,,)"; - - newline (os); - - unwind_protect::run_frame ("octave_cs_list_print"); -} - /* ;;; Local Variables: *** ;;; mode: C++ ***