[Top][All Lists]

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

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

From: Lachlan Andrew
Subject: [Octave-patch-tracker] [patch #8783] C++ implementation of textscan
Date: Sat, 13 Feb 2016 03:55:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

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

Philip, I've been looking at the uneven-lines issue.

Under Linux at least, the current textscan seems to output uneven lines even
if the last character in the file is an end-of-line.  However, it outputs even
lines if the last *two* characters are bot end-of-line.  My guess is that the
last EOL gets swallowed by the process that reads in the line.  My guess is
also that most applications don't care whether or not the output is padded
when the last scan is incomplete; garbage-in-garbage-out...  Still, I'll keep
trying to get it to work, for completeness.

octave:1> f = fopen ("partial.txt")
f =  3
octave:2> a = textscan (f, "%d %d %d")
a = 
  [1,1] =


  [1,2] = 2
  [1,3] = 3

$ od -h --format x1 partial.txt
0000000  2031  2032  0a33  0a34
        31 20 32 20 33 0a 34 0a


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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