[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62152] Textscan fails in rare occurences
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #62152] Textscan fails in rare occurences |
Date: |
Tue, 8 Mar 2022 11:56:39 -0500 (EST) |
Follow-up Comment #2, bug #62152 (project octave):
A someone stripped down reproducer for "Spectrum_ABEC_3.txt":
Path2filename = 'Spectrum_ABEC_3.txt';
fileID = fopen (Path2filename, 'r');
formatSpec = repmat ('%f', 1, 75);
delimiter = ' ';
startRow = 105;
endRow = 144;
dataArray = textscan (fileID, formatSpec, endRow-startRow+1, 'Delimiter',
delimiter, 'MultipleDelimsAsOne', true, 'HeaderLines', startRow-1,
'ReturnOnError', true, 'EndOfLine', '\r\n');
fclose (fileID);
assert (dataArray{24}(27), 7.45644633363295e-5)
I didn't write that here before: When I remove one of the digits of that
number in the source text file, the entire file reads correctly. That's what
makes me suspicious about the buffering that seems to be happening in
chunks...
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62152>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/