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

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

[Octave-bug-tracker] [bug #43972] "strread" command with "commentstyle",


From: anonymous
Subject: [Octave-bug-tracker] [bug #43972] "strread" command with "commentstyle", "matlab" does not work
Date: Sat, 10 Jan 2015 22:16:54 +0000
User-agent: Opera/9.80 (X11; Linux x86_64; Edition Linux Mint) Presto/2.12.388 Version/12.16

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

                 Summary: "strread" command with "commentstyle","matlab" does
not work
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sat 10 Jan 2015 10:16:53 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Edwin de Koning
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The strread command with a "commentstyle" as either "shell", "c++" or "matlab"
does not work. If the "commentstyle" is "c"then it does work.

Example:
>> strread("Hello World! /* this is comment*/","%s", -1, "commentstyle","c")
ans =
{
  [1,1] = Hello
  [2,1] = World!
}
This works as expected.



>> strread("Hello World! % this is comment","%s", -1,
"commentstyle","matlab")
ans =
{
  [1,1] = Hello
  [2,1] = World!
  [3,1] = %
  [4,1] = this
  [5,1] = is
  [6,1] = comment
}
This is wrong. The comment after the % sign is still present in the answer.
It also goes wrong for the other options "shell" or "c++" where the comment
has to be removed until the End-Of-Line character.







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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