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: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option
Date: Wed, 29 Nov 2017 14:27:21 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #7, bug #52550 (project octave):

I agree, but I'm fine with sequestering the multi-char delimiter with a
property.  Somebody put a lot of work into it.

That's a strange example you've given, but I think it's a matter of not being
formatted correctly because the last command below makes sense:


octave:39> str = 'ABC1ABC2ABC3'
str = ABC1ABC2ABC3
octave:40> textscan (str, '%d %d %d', 'delimiter', {'ABC'})
ans =
{
  [1,1] =

    0
    3

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

octave:41> textscan (str, '%d %d %d %d', 'delimiter', {'ABC'})
ans =
{
  [1,1] = 0
  [1,2] = 1
  [1,3] = 2
  [1,4] = 3
}



I think in the middle example it is as though Octave is interpretting this as
a collection of columns in an otherwise matrix.  That is, %d%d%d suggests to
read the input as a matrix with three columns, so it comes out


   0   1   2
   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]