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

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

[Octave-bug-tracker] [bug #36464] strread() format strings containing %[


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #36464] strread() format strings containing %[^] markers
Date: Tue, 15 May 2012 11:58:41 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Follow-up Comment #3, bug #36464 (project octave):

Progress report:

While again looking into %[...] specifiers again last evening, it soon dawned
upon me what the issue was last summer when I first tried to implement this.

Due to the way strread.m has been set up, the data file is split up into
columns before the actual regular expressions constituted by %[...] format
specifiers are processed. 
While splitting up, multiple contiguous whitespaces are folded into one, incl.
those within data fields coresponding to %[...] specifiers. Worse yet, data
fields can be split into multiple data columns if they contain whitespace
and/or delimiter chars.

This implies that %[...] (and for that matter, "..." (%q) fields) containing
whitespace and delimiters may come out severely if not completely garbled.
That is, provided strread hasn't lost track and gave up long before even
reaching EOF.
Same goes for %[^....].

Only %*[...] and %*[^...] conversion specifiers (which merely skip character
strings) have a chance of working somewhat reliably.

So, I think implementing %[...] and %q specifiers can be done, but without
guarantee that the corresponding text output isn't mangled.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36464>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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