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

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

[Octave-patch-tracker] [patch #8783] C++ implementation of textscan


From: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #8783] C++ implementation of textscan
Date: Thu, 11 Feb 2016 17:14:39 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38

Follow-up Comment #41, patch #8783 (project octave):

? is there no binary equivalent for fseek () ?

What many other modules like this do (e.g., csv2cell() in the io package) is
to read text into a buffer and operate (read) on that.  I can't imagine that
textscan() wouldn't do similar, but probably it is shielded from the
programmer? (I really don't know, I'm just a c++ n00b and then esp. wrt
Octave's C++ function universe.)

I think that -depending on the situation/format specifier at hand, it is often
required to do some read-ahead ("peeking") at what follows next. Complex
fields are one example, "cuddling" literals is another.

When relying solely on C/C++ functions like [f,s]scanf I think some
flexibility is sacrificed for speed; which is probably the reason Matlab's
textscan/strread often hickup on some text files that Octave's current strread
happily accepts (with other limitations, granted).


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8783>

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




reply via email to

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