Mercurial > octave-nkf
diff src/ov-list.cc @ 2916:4e7bea116f24
[project @ 1997-04-30 20:56:31 by jwe]
author | jwe |
---|---|
date | Wed, 30 Apr 1997 20:57:48 +0000 |
parents | cc2c4f0d4d08 |
children | 5e0fe4c5d52f |
line wrap: on
line diff
--- a/src/ov-list.cc Wed Apr 30 20:53:14 1997 +0000 +++ b/src/ov-list.cc Wed Apr 30 20:57:48 1997 +0000 @@ -29,6 +29,7 @@ #endif #include <iostream.h> +#include <strstream.h> #include "lo-utils.h" @@ -90,7 +91,6 @@ { begin_unwind_frame ("octave_list_print"); - newline (os); indent (os); os << "("; newline (os); @@ -101,9 +101,15 @@ for (int i = 0; i < n; i++) { + ostrstream buf; + buf << "[" << i+1 << "]" << ends; + const char *nm = buf.str (); + octave_value val = lst(i); - val.print (os); + val.print_with_name (os, nm); + + delete [] nm; } decrement_indent_level (); @@ -120,6 +126,7 @@ { indent (os); os << name << " ="; + newline (os); return false; }