comparison src/ov-cell.cc @ 4243:7e4d5b5520e5

[project @ 2002-12-27 05:30:59 by jwe]
author jwe
date Fri, 27 Dec 2002 05:30:59 +0000
parents 23d06c9e1edd
children fc9a075d10fb
comparison
equal deleted inserted replaced
4242:4d3994172bd5 4243:7e4d5b5520e5
246 error ("invalid conversion from cell array to list"); 246 error ("invalid conversion from cell array to list");
247 247
248 return retval; 248 return retval;
249 } 249 }
250 250
251 string_vector
252 octave_cell::all_strings (void) const
253 {
254 int nr = rows ();
255 int nc = columns ();
256
257 string_vector retval (nr * nc);
258
259 int k = 0;
260
261 for (int j = 0; j < nc; j++)
262 {
263 for (int i = 0; i < nr; i++)
264 {
265 retval[k++] = matrix(i,j).string_value ();
266
267 if (error_state)
268 return string_vector ();
269 }
270 }
271
272 return retval;
273 }
274
251 void 275 void
252 octave_cell::print (std::ostream& os, bool) const 276 octave_cell::print (std::ostream& os, bool) const
253 { 277 {
254 print_raw (os); 278 print_raw (os);
255 } 279 }