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

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

[Octave-bug-tracker] [bug #59389] comparison of double-quoted strings is


From: Alois Schlögl
Subject: [Octave-bug-tracker] [bug #59389] comparison of double-quoted strings is different than matlab
Date: Sun, 1 Nov 2020 06:28:26 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?59389>

                 Summary: comparison of double-quoted strings is different
than matlab
                 Project: GNU Octave
            Submitted by: schloegl
            Submitted on: Sun 01 Nov 2020 11:28:25 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The result of this code is different 

a="BALL";
b="BELL";

a>b
a<b
a==b


The output on Matlab R2020a is 

>> a>b  
ans =
  logical
   0
>> a<b
ans =
  logical
   1
>> a==b
ans =
  logical
   0


The output on octave (4.4.1, 5.2.0, 6.0.0 (compiled from source on 2020-03-26)
is  

octave:3> a>b
ans =

  0  0  0  0

octave:4> a<b
ans =

  0  1  0  0

octave:5> a==b
ans =

  1  0  1  1




When single-quoted strings are used in Matlab, the behaviour is the same as in
Octave. 





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59389>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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