comparison src/ov-list.cc @ 5958:85c7dc4afe6b

[project @ 2006-08-23 18:35:38 by jwe]
author jwe
date Wed, 23 Aug 2006 18:35:39 +0000
parents cdef72fcd206
children 5d4ce539004f
comparison
equal deleted inserted replaced
5957:370f785718be 5958:85c7dc4afe6b
536 536
537 return retval; 537 return retval;
538 } 538 }
539 539
540 bool 540 bool
541 octave_list::save_ascii (std::ostream& os, bool& infnan_warned, 541 octave_list::save_ascii (std::ostream& os, bool& infnan_warned)
542 int strip_nan_and_inf)
543 { 542 {
544 octave_value_list lst = list_value (); 543 octave_value_list lst = list_value ();
545 os << "# length: " << lst.length () << "\n"; 544 os << "# length: " << lst.length () << "\n";
546 545
547 for (int i = 0; i < lst.length (); ++i) 546 for (int i = 0; i < lst.length (); ++i)
550 549
551 std::ostringstream buf; 550 std::ostringstream buf;
552 buf << "_" << i; 551 buf << "_" << i;
553 std::string s = buf.str (); 552 std::string s = buf.str ();
554 553
555 bool b = save_ascii_data (os, lst (i), s.c_str (), infnan_warned, 554 bool b = save_ascii_data (os, lst (i), s.c_str (), infnan_warned,
556 strip_nan_and_inf, 0, 0); 555 false, 0);
557 556
558 if (! b) 557 if (! b)
559 return false; 558 return false;
560 } 559 }
561 560