Mercurial > hg > octave-avbm
comparison src/ov-struct.cc @ 5880:84ca47e311b3
[project @ 2006-07-06 22:34:48 by jwe]
author | jwe |
---|---|
date | Thu, 06 Jul 2006 22:36:00 +0000 |
parents | 22e23bee74c8 |
children | c20eb7330d13 |
comparison
equal
deleted
inserted
replaced
5879:4f1112bfafce | 5880:84ca47e311b3 |
---|---|
414 } | 414 } |
415 | 415 |
416 void | 416 void |
417 octave_struct::print_raw (std::ostream& os, bool) const | 417 octave_struct::print_raw (std::ostream& os, bool) const |
418 { | 418 { |
419 // FIXME -- would be nice to print the output in some | |
420 // standard order. Maybe all substructures first, maybe | |
421 // alphabetize entries, etc. | |
422 | |
423 unwind_protect::begin_frame ("octave_struct_print"); | 419 unwind_protect::begin_frame ("octave_struct_print"); |
424 | 420 |
425 unwind_protect_int (Vstruct_levels_to_print); | 421 unwind_protect_int (Vstruct_levels_to_print); |
426 | 422 |
427 if (Vstruct_levels_to_print >= 0) | 423 if (Vstruct_levels_to_print >= 0) |
448 newline (os); | 444 newline (os); |
449 | 445 |
450 increment_indent_level (); | 446 increment_indent_level (); |
451 } | 447 } |
452 | 448 |
453 for (Octave_map::const_iterator p = map.begin (); p != map.end (); p++) | 449 string_vector key_list = map.keys (); |
454 { | 450 |
455 std::string key = map.key (p); | 451 for (octave_idx_type i = 0; i < key_list.length (); i++) |
456 Cell val = map.contents (p); | 452 { |
453 std::string key = key_list[i]; | |
454 | |
455 Cell val = map.contents (key); | |
457 | 456 |
458 octave_value tmp = (n == 1) ? val(0) : octave_value (val, true); | 457 octave_value tmp = (n == 1) ? val(0) : octave_value (val, true); |
459 | 458 |
460 if (print_keys_only) | 459 if (print_keys_only) |
461 { | 460 { |