octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54661] textscan() continues from next line if


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #54661] textscan() continues from next line if line ends with delimiter
Date: Sun, 16 Sep 2018 17:19:27 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48

Follow-up Comment #6, bug #54661 (project octave):

@Dan:
yes I've been working at textscan.m & strread.m but that was years ago when
textscan.m was a mere .m-file wrapper for strread.m that just added some bells
& whistles. Now that textscan is a C++ function and ripped apart and scattered
over various other internal functions, and because my C/C++ proficiency is a
bit lacking, I've let textscan() go.
I think the main part of my contribution that still stands is some overview of
the way delimiters, whitespaces and endoflines interfere with each other. (And
even that is up for debate these days now that Matlab's docs get better and
less ambiguous.)

EOLs are implicitly part of the delimiter collection, unless declared
whitespace by the user. Or something like that :-)
AFAIU for textscan EOLs are not that special, unlike e.g., dlmread, so that
one data row can extend across several lines, again unlike dlmread. That EOLs
are not special is evident because if in the OP's example the EOLs are
replaced by any another delimiter there is no more bug.

I have little time the next weeks (September is always a very busy month at
work); but I'll try to find out why strread.m has the same bug. I think it has
some tests for this case, but apparently not stringent enough.

>From what I see I conclude that the last empty field is simply not recognized
properly because of the way EOLs are interpreted/treated by both textscan()
and strread.m; but you already came to that conclusion :-)


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54661>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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