<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div>Anfang der weitergeleiteten E-Mail:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Von: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Mike Steglich &lt;<a href="mailto:mike.steglich@th-wildau.de">mike.steglich@th-wildau.de</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Betreff: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Re: [Cmpl] bug with readcsv</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Datum: </b></span><span style="font-family:'Helvetica'; font-size:medium;">22. April 2013 17:53:39 MESZ<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>An: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Bastian Dörig &lt;<a href="mailto:Bastian_D@hotmail.de">Bastian_D@hotmail.de</a>&gt;<br></span></div><br><div>Hello Bastian,<br><br>It seems that an old bug is appearing again. The \r\n at the end of the first line is interpreted as two new line feeds. This error should only appear at Windows. <br><br>It will be fixed in the next release.<br><br>In the meantime I would like to suggest to use a cmplData file.<br><br>test.cdat<br>########<br>rows set &lt; 1..2&gt;<br>cols set &lt;1..2&gt;<br>E[rows,cols] &lt; 10 2999<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>10 299&gt;<br>######<br><br>test.cmpl<br>###########<br>%data test.cdat: rows set, cols set, E[rows,cols]<br><br>parameters:<br><span class="Apple-tab-span" style="white-space:pre">        </span>echo count(E[,1]);<br><span class="Apple-tab-span" style="white-space:pre">        </span>echo E[1,1];<br><span class="Apple-tab-span" style="white-space:pre">        </span>echo E[1,2];<br><span class="Apple-tab-span" style="white-space:pre">        </span>echo E[2,1];<br><span class="Apple-tab-span" style="white-space:pre">        </span>echo E[2,2];<br><span class="Apple-tab-span" style="white-space:pre">        </span>#echo E[3,1];<br><span class="Apple-tab-span" style="white-space:pre">        </span>#echo E[3,2];<br><br>....<br>######<br><br><br>Thanks,<br><br>Mike<br><br><br><br><br>Am 22.04.2013 um 15:47 schrieb Bastian Dörig:<br><br><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I've found a bug with readcsv and don't know how to fix it.<br></blockquote><blockquote type="cite">I want to import a matrix from a csv file.<br></blockquote><blockquote type="cite">The csv file "test.csv":<br></blockquote><blockquote type="cite">10;29999<br></blockquote><blockquote type="cite">10;299<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">and my cmpl file is:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">parameters:<br></blockquote><blockquote type="cite">E[,] := readcsv("test.csv");<br></blockquote><blockquote type="cite">echo count(E[,1]);<br></blockquote><blockquote type="cite">echo E[1,1];<br></blockquote><blockquote type="cite">echo E[1,2];<br></blockquote><blockquote type="cite">echo E[2,1];<br></blockquote><blockquote type="cite">echo E[2,2];<br></blockquote><blockquote type="cite">echo E[3,1];<br></blockquote><blockquote type="cite">echo E[3,2];<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">with the output:<br></blockquote><blockquote type="cite">3 (the file contains only 2 rows, here's the first mistake)<br></blockquote><blockquote type="cite">10 (correct)<br></blockquote><blockquote type="cite">29999 (correct)<br></blockquote><blockquote type="cite">9999 (this are the last 4 digits of the last number in the first row)<br></blockquote><blockquote type="cite">error (interpreter): file test.cmpl line7: Parameter E[2,2] is not defined<br></blockquote><blockquote type="cite">1 (I think this belongs to the error above)<br></blockquote><blockquote type="cite">10 (correct)<br></blockquote><blockquote type="cite">299 (correct)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">to sum up:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">10;29999<br></blockquote><blockquote type="cite">10;299<br></blockquote><blockquote type="cite">is made to<br></blockquote><blockquote type="cite">10;29999<br></blockquote><blockquote type="cite">9999<br></blockquote><blockquote type="cite">10;299<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">the last digits of a row are put into a new row. If the csv file consists of 3 rows, there will be 5 rows after the import. It doesn't depend on the length of the rows.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It would be nice if you could help me.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">regrads,<br></blockquote><blockquote type="cite">Bastian Dörig<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Cmpl mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Cmpl@list.coin-or.org">Cmpl@list.coin-or.org</a><br></blockquote><blockquote type="cite"><a href="http://list.coin-or.org/mailman/listinfo/cmpl">http://list.coin-or.org/mailman/listinfo/cmpl</a><br></blockquote><br></div></blockquote></div><br></body></html>