Mercurial > hg > octave-avbm
diff src/ov-struct.cc @ 4604:cba347c642e2
[project @ 2003-11-13 04:38:05 by jwe]
author | jwe |
---|---|
date | Thu, 13 Nov 2003 04:38:05 +0000 |
parents | e84592dc70b9 |
children | d44675070f1a |
line wrap: on
line diff
--- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -376,6 +376,17 @@ int n = map.numel (); + if (n > 1 && print_keys_only) + { + indent (os); + dim_vector dv = dims (); + os << dv.str () << " struct array containing the fields:"; + newline (os); + newline (os); + + increment_indent_level (); + } + for (Octave_map::const_iterator p = map.begin (); p != map.end (); p++) { std::string key = map.key (p); @@ -386,13 +397,21 @@ if (print_keys_only) { indent (os); - os << key << ": " << tmp.type_name (); + os << key; + if (n == 1) + { + dim_vector dv = tmp.dims (); + os << ": " << dv.str () << " " << tmp.type_name (); + } newline (os); } else tmp.print_with_name (os, key); } + if (n > 1 && print_keys_only) + decrement_indent_level (); + decrement_indent_level (); indent (os);