mfscanf returns [] when datafile contain a header
Reported by Roland
Originally assigned to Charlotte HECQUET
test.txt (328 bytes, text/plain)
datafile to reproduce the bug
BUG DESCRIPTION:
----------------
The function mfscanf returns [] when the underlying datafile contains a header.
ERROR LOG:
----------
None, wrong behaviour.
HOW TO REPRODUCE THE BUG:
-------------------------
// Use a file test.txt (see attachment) with the following data :
// Date;X1;X2;X3;X4
// 01/01/1981 00:00;16.84;2.05;10.07;0.5
// 01/01/1981 01:00;16.9;2.17;10.24;0.5
// 01/01/1981 02:00;17.47;2.38;10.53;0.5
// 01/01/1981 03:00;15.9;2.58;10.84;0.5
// 01/01/1981 04:00;14.8;2.71;11.08;0.5
fid = mopen( "test.txt",'r' );
// Get the header
header = mgetl( fid, 1 );
// Get the data => returns []
data_all = mfscanf( -1, fid, data_format = "%d/%d/%d %d:%d;%f;%f;%f;%f");
OTHER INFORMATION:
------------------
This piece of code works on Scilab 5.5.2.