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

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

[Octave-bug-tracker] [bug #52550] textscan drops delimiter character for


From: Rik
Subject: [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option
Date: Wed, 29 Nov 2017 13:54:44 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #52550 (project octave):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #6:

For comment #2, could we get a test of whether Matlab accepts multi-character
delimiters?  If we don't need to support these in Octave then maybe we
*should* just drop them and make our lives easier.

Here is a test case


str = ABC1ABC2ABC3
textscan ('%d %d %d', 'delimiter', {'ABC'})


Octave's answer is wrong, but it does accept multiple-character delimiters.


ans =
{
  [1,1] =

    0
    3

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


I'm pretty sure the answer really should be a cell array {0, 1, 2, 3}.  The
empty value at the front of the string was recorded as 0, but somehow also
snagged the final value of 3.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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