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

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

[Octave-bug-tracker] [bug #57612] textscan omits final column value for


From: Rik
Subject: [Octave-bug-tracker] [bug #57612] textscan omits final column value for CSV is value is empty
Date: Sun, 29 Mar 2020 14:34:51 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #57612 (project octave):

                  Status:               Confirmed => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #3:

I checked in a fix for this on the development branch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/abcff237241f.  This will be a
part of the 7.1 release of Octave.

Octave now behaves in a way I find sensible, but which is Matlab incompatible.
 Here is simplified test code and the result  


str = sprintf (['101,' '\n' '201,']);
C = textscan (str, '%s%q', 'Delimiter', ',')

C =
{
  [1,1] =
  {
    [1,1] = 101
    [2,1] = 201
  }

  [1,2] =
  {
    [1,1] = 
    [2,1] = 
  }

}


As you can see, the second output in the cell array contains two empty
entries.  This makes sense to me because there is no value after the ','
delimiter to read for both row 1 and row 2.  Matlab, however, returns just a
single empty value.  Apparently, it treats end-of-file (EOF) differently from
end-of-line (EOL) which I find unnecessary.

Marking as fixed and closing report.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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