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

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

[Octave-bug-tracker] [bug #41648] fread not working with skip parameter


From: Rik
Subject: [Octave-bug-tracker] [bug #41648] fread not working with skip parameter
Date: Sat, 22 Feb 2014 16:19:35 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0

Follow-up Comment #5, bug #41648 (project octave):

The patch is almost perfect.  The only difference now is that when the read +
skip reaches the EOF the 3.8.1 version adds a zero element while the 3.6.4
version correctly finds no data to read and doesn't append a zero element.

Example:


fread (fid, [3,Inf], '3*uint8',1)

On 3.6.4
ans =

    0    4    8   12
    1    5    9   13
    2    6   10   14

On 3.8.1

ans =

    0    4    8   12    0
    1    5    9   13    0
    2    6   10   14    0


Similarly


fread (fid, [1,Inf], '4*uint16',3)

On 3.6.4
ans =

    256    770   1284   1798   3083   3597

On 3.8.1
ans =

    256    770   1284   1798   3083   3597      0



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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