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

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

[Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when c


From: Motius
Subject: [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file
Date: Wed, 22 Nov 2017 08:11:34 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0

URL:
  <http://savannah.gnu.org/bugs/?52479>

                 Summary: textscan ignores leading spaces when creating cell
from string/file
                 Project: GNU Octave
            Submitted by: motius
            Submitted on: Wed 22 Nov 2017 02:11:33 PM CET
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: Motius
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

= SYNOPSIS =
The following snippet illustrates a regressions in the *textscan* GNU octave
function.

= EXAMPLE =


a = "\t\ta\tb\tc\n"
textscan(a, '%s', 'delimiter', sprintf('\t'))


= RESULTS =

Gives the following result under GNU octave v4.0.3:

{
  [1,1] = 
  {
    [1,1] = 
    [2,1] = 
    [3,1] = a
    [4,1] = b
    [5,1] = c
  }
}


and the following result under GNU octave v4.2.1 (1a8b7b3ae5f2):

{
  [1,1] = 
  {
    [1,1] = a
    [2,1] = b
    [3,1] = c
  }
}


= MATLAB =

The second one differs from MatLab behaviors.

= OTHER =

== History ==

I initially reported this bug in the comments of bug 50485:
https://savannah.gnu.org/bugs/?50485#comment3

== Tests ==

This was tested on debian GNU/Linux 9.1:
- Octave 4.0.3 in the repositories
- Octave 4.2.1 compiled from source (hg id: 1a8b7b3ae5f2)





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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