Menu

#1446 Strict comparison of numbers is incorrect

v4.2.0
closed
Erich
None
none
1
2017-05-02
2017-05-01
Walter
No

The Test program:
/ REXX /
Parse version v; Say v
x=3
y=22
Say 'x>y ->' (x>y)
Say 'x>>y ->' (x>>y)

J:>rexx sc
REXX-ooRexx_4.2.0(MT)_64-bit 6.04 22 Feb 2014
x>y -> 0
x>>y -> 0

J:>regina sc
REXX-Regina_3.9.1(MT) 5.00 5 Apr 2015
x>y -> 0
x>>y -> 1
I think that Regina is correct

1 Attachments

Related

Bugs: #1446

Discussion

  • Bruce

    Bruce - 2017-05-01

    It would seem in the case where “3”>>”22”, that failure would occur because “3” is the shorter string, and therefor can never be greater than “22”, even if y was “00”. Strict comparisons are always string comparisons not numeric comparisons.

    my $0.02.

    Bruce

    On May 1, 2017, at 9:29 AM, Walter walter-pachl@users.sf.net wrote:

    [bugs:#1446] https://sourceforge.net/p/oorexx/bugs/1446/ Strict comparison of numbers is incorrect

    Status: open
    Group: None
    Created: Mon May 01, 2017 04:29 PM UTC by Walter
    Last Updated: Mon May 01, 2017 04:29 PM UTC
    Owner: nobody
    Attachments:

    sc.rex https://sourceforge.net/p/oorexx/bugs/1446/attachment/sc.rex (90 Bytes; text/x-rexx)
    The Test program:
    / REXX /
    Parse version v; Say v
    x=3
    y=22
    Say 'x>y ->' (x>y)
    Say 'x>>y ->' (x>>y)
    J:>rexx sc
    REXX-ooRexx_4.2.0(MT)_64-bit 6.04 22 Feb 2014
    x>y -> 0
    x>>y -> 0

    J:>regina sc
    REXX-Regina_3.9.1(MT) 5.00 5 Apr 2015
    x>y -> 0
    x>>y -> 1
    I think that Regina is correct

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oorexx/bugs/1446/ https://sourceforge.net/p/oorexx/bugs/1446/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ https://sourceforge.net/auth/subscriptions/

     
    • Walter

      Walter - 2017-05-01

      I don't buy your change :-)

      try x3>>x22

      Bruce bjskelly@users.sf.net hat am 1. Mai 2017 um 19:54 geschrieben:

      It would seem in the case where “3”>>”22”, that failure would occur
      

      because “3” is the shorter string, and therefor can never be greater than
      “22”, even if y was “00”. Strict comparisons are always string comparisons not
      numeric comparisons.

      my $0.02.
      
      Bruce
      
          > >
      
          On May 1, 2017, at 9:29 AM, Walter walter-pachl@users.sf.net
      

      mailto:walter-pachl@users.sf.net wrote:

          [bugs:#1446] https://sourceforge.net/p/oorexx/bugs/1446/
      

      https://sourceforge.net/p/oorexx/bugs/1446/ Strict comparison of numbers is
      incorrect

          Status: open
          Group: None
          Created: Mon May 01, 2017 04:29 PM UTC by Walter
          Last Updated: Mon May 01, 2017 04:29 PM UTC
          Owner: nobody
          Attachments:
      
          sc.rex https://sourceforge.net/p/oorexx/bugs/1446/attachment/sc.rex
      

      (90 Bytes; text/x-rexx)
      The Test program:
      / REXX /
      Parse version v; Say v
      x=3
      y=22
      Say 'x>y ->' (x>y)
      Say 'x>>y ->' (x>>y)
      J:>rexx sc
      REXX-ooRexx_4.2.0(MT)_64-bit 6.04 22 Feb 2014
      x>y -> 0
      x>>y -> 0

          J:>regina sc
          REXX-Regina_3.9.1(MT) 5.00 5 Apr 2015
          x>y -> 0
          x>>y -> 1
          I think that Regina is correct
      
          Sent from sourceforge.net because you indicated interest in
      

      https://sourceforge.net/p/oorexx/bugs/1446/
      https://sourceforge.net/p/oorexx/bugs/1446/
      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions/

      >     ---------------------------------------------
      
      [bugs:#1446] https://sourceforge.net/p/oorexx/bugs/1446/ Strict comparison
      

      of numbers is incorrect

      Status: open
      Group: None
      Created: Mon May 01, 2017 04:29 PM UTC by Walter
      Last Updated: Mon May 01, 2017 04:29 PM UTC
      Owner: nobody
      Attachments:
      
          * sc.rex https://sourceforge.net/p/oorexx/bugs/1446/attachment/sc.rex
      

      (90 Bytes; text/x-rexx)

      The Test program:
      / REXX /
      Parse version v; Say v
      x=3
      y=22
      Say 'x>y ->' (x>y)
      Say 'x>>y ->' (x>>y)
      
      J:>rexx sc
      REXX-ooRexx_4.2.0(MT)_64-bit 6.04 22 Feb 2014
      x>y -> 0
      x>>y -> 0
      
      J:>regina sc
      REXX-Regina_3.9.1(MT) 5.00 5 Apr 2015
      x>y -> 0
      x>>y -> 1
      I think that Regina is correct
      
      ---------------------------------------------
      
      Sent from sourceforge.net because you indicated interest in
      

      https://sourceforge.net/p/oorexx/bugs/1446/

      To unsubscribe from further messages, please visit
      

      https://sourceforge.net/auth/subscriptions/

      LG

      Walter

       
  • Erich

    Erich - 2017-05-01

    Walter, this was fixed for 5.0 - see [bugs:#1358]

    Strict comparisions always carry out a simple character-by-character comparison, without attempting to perform a numeric comparison.

     

    Related

    Bugs: #1358

  • LesK

    LesK - 2017-05-02

    Walter: Don't forget tthat you can use Gil's orxver.bat to create a backup of your current version that it
    can restore in place of 5.0.0 while saving it too!

     

Anonymous
Anonymous

Add attachments
Cancel