octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Should dlmwrite warn or error when using dumb separators?


From: Andreas Weber
Subject: Should dlmwrite warn or error when using dumb separators?
Date: Wed, 31 Aug 2011 18:10:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110820 Icedove/3.1.12

Dear maintainers,

dlmwrite("test1.log",[1.23,pi],".")

$ cat test1.log
1.23.3.141592653589793

x=dlmread("test1.log",".")
x =

   1.0000e+00   2.3000e+01   3.0000e+00   1.4159e+14


I would expect to see a warning or error "using same character as
decimal- and field separator"

Also separators like '-' or 'e' are dangerous...

Btw, the tests in dlmread.cc uses only ',' as delimiter, perhaps we
should also test with different separators like ';'?

The functions ./scripts/io/csvread.m and ./scripts/io/csvwrite.m have no
tests but call dlmread/write directly with ',' as separator. What is the
preferred way to test such simple "default value wrapper functions"?
Perhaps moving the tests with ',' as separator from dlmread/write to
csvread/write and test other separators in dlmread/write?

TIA Andy


reply via email to

[Prev in Thread] Current Thread [Next in Thread]