bugGNU Octave - Bugs: bug #53439, double quote and single quote...

 
 

bug #53439: double quote and single quote equality producing different result unlike MATLAB

Submitted by:  Dildar Sk <hodor123456>
Submitted on:  Fri 23 Mar 2018 10:33:42 AM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Duplicate Assigned to:  None
Originator Name:  Dildar Sk Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Fri 23 Mar 2018 06:25:55 PM UTC, comment #6: 

Agree.

Dildar, we are not saying that you are wrong or that your testing is unwelcome. All we are saying is that we know that double quotes in Octave do not produce a string object, that is what bug #50855 is about. Since there is no such thing as a string object in Octave yet, it doesn't really help anyone to have a bug about how the eq function or == operator works between char arrays and string objects.

Mike Miller <mtmiller>
Project Administrator
Fri 23 Mar 2018 06:22:28 PM UTC, comment #5: 

There are many things that won't work in a Matlab compatible way regarding "" strings until we actually have a string class.  Having a bug report about this particular issue is not really helpful at this point.

John W. Eaton <jwe>
Project Administrator
Fri 23 Mar 2018 06:09:44 PM UTC, comment #4: 

Forgive me,But I don't think it's duplicate of #50855.
Because that said,the appearance of new syntax when this
report saying the result of that.Like '' turns to "" in
MATLAB which is not in that bug.Correct me if I am wrong.

Dildar Sk <hodor123456>
Fri 23 Mar 2018 05:11:57 PM UTC, comment #3: 

I think we can close this as a duplicate of bug #50855, make that be the canonical placeholder bug for any future bug reports of the form "double quoted strings return a string object in Matlab".

Mike Miller <mtmiller>
Project Administrator
Fri 23 Mar 2018 04:21:45 PM UTC, comment #2: 

This is part of a much larger task, supporting the String data type that is relatively new in Matlab.

You should find that 'abc' == 'abc' returns [1,1,1] in Matlab.  So it is doing something different when comparing String objects to character arrays.

John W. Eaton <jwe>
Project Administrator
Fri 23 Mar 2018 11:18:47 AM UTC, comment #1: 

On MATLAB,

>> '' == ""

ans =

  logical

   1

>> "" == ""

ans =

  logical

   1

On Octave,

>> '' == ""
ans = [](0x0)
>> "" == ""
ans = [](0x0)

Dildar Sk <hodor123456>
Fri 23 Mar 2018 10:33:42 AM UTC, original submission:  

in MATLAB,

>> 'abc' == "abc"

ans =

  logical

   1

>> "abc" == "abc"

ans =

  logical

   1

in Octave,

>> 'abc' == 'abc'
ans =

  1  1  1

>> 'abc' == "abc"
ans =

  1  1  1

>> "abc" == "abc"
ans =

  1  1  1

Dildar Sk <hodor123456>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by hodor123456 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-23 mtmiller StatusNone => Duplicate
        Open/ClosedOpen => Closed
        Dependencies- => Depends on bugs #50855

    Back to the top


    Powered by Savane 3.7