comparison src/ov-struct.cc @ 4499:55695bf73797

[project @ 2003-09-05 19:56:37 by jwe]
author jwe
date Fri, 05 Sep 2003 19:56:37 +0000
parents 83d4452bc522
children 508238e65af7
comparison
equal deleted inserted replaced
4498:093e39f03506 4499:55695bf73797
113 if (t_idx.length () == 1) 113 if (t_idx.length () == 1)
114 { 114 {
115 idx_vector i = t_idx(0).index_vector (); 115 idx_vector i = t_idx(0).index_vector ();
116 octave_value_list t = tmp.index (i); 116 octave_value_list t = tmp.index (i);
117 117
118 retval = (t.length () == 1) ? t(0) : octave_value (t); 118 retval = (t.length () == 1) ? t(0) : octave_value (t, true);
119 119
120 // We handled two index elements, so tell 120 // We handled two index elements, so tell
121 // next_subsref to skip both of them. 121 // next_subsref to skip both of them.
122 122
123 skip++; 123 skip++;
143 143
144 case '.': 144 case '.':
145 { 145 {
146 octave_value_list t = dotref (idx.front ()); 146 octave_value_list t = dotref (idx.front ());
147 147
148 retval = (t.length () == 1) ? t(0) : octave_value (t); 148 retval = (t.length () == 1) ? t(0) : octave_value (t, true);
149 } 149 }
150 break; 150 break;
151 151
152 case '{': 152 case '{':
153 gripe_invalid_index_type (type_name (), type[0]); 153 gripe_invalid_index_type (type_name (), type[0]);
420 for (Octave_map::const_iterator p = map.begin (); p != map.end (); p++) 420 for (Octave_map::const_iterator p = map.begin (); p != map.end (); p++)
421 { 421 {
422 std::string key = map.key (p); 422 std::string key = map.key (p);
423 octave_value_list val = map.contents (p); 423 octave_value_list val = map.contents (p);
424 424
425 octave_value tmp = (n == 1) ? val(0) : octave_value (val); 425 octave_value tmp = (n == 1) ? val(0) : octave_value (val, true);
426 426
427 if (print_keys_only) 427 if (print_keys_only)
428 { 428 {
429 indent (os); 429 indent (os);
430 os << key << ": " << tmp.type_name (); 430 os << key << ": " << tmp.type_name ();