[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45712] strread bug when ignoring a string
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #45712] strread bug when ignoring a string |
Date: |
Thu, 13 Aug 2015 20:20:13 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 |
Follow-up Comment #5, bug #45712 (project octave):
As to whitespace, that's a bit of an opaque issue.
>From what I understand, if you do not specify a value for it, whitespace is
usually added to the delimiters, unless a "%s" specifier is in the format
string. See here:
http://nl.mathworks.com/help/matlab/ref/strread.html
Indeed, first of all multiple consecutive whitespace is usually collapsed. To
some extent even "trimmed", if there's an adjacent delimiter.
Delimiters aren't collapsed, unless param "multipledelimsasone" is given with
value true.
The functional distinction/relation between delimiters and whitespace is more
complicated than described above and poorly documented.
Next, the string is split on delimiter occurrences.
The next step then in strread.m is trying to match the format string to the
(usually first line of the) data. That serves as a first check but also inits
several variables needed for ensuing steps.
In those further steps, a.o., fields immediately bordering literals and other
fields are separated (e.g., "...1.5abc..." with fmt specs "...%f%s..." or
"...%fabc..."). Think of ~ "virtual delimiters".
All in all the code is quite messy, but most of that is due to the way
strread.m has been vectorized to the limit.
We do need a binary replacement; it was thought a binary textscan() could
replace strread.m's innards but no one has come up with a working function
yet.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45712>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, anonymous, 2015/08/07
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/07
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/08
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/09
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Francesco Potortì, 2015/08/13
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/14
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Francesco Potortì, 2015/08/14
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/15
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/15
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Francesco Potortì, 2015/08/15
- [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string, Philip Nienhuis, 2015/08/16