# New Ticket Created by  Simon Glover 
# Please include the string:  [perl #24267]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24267 >



 This code:

        set I0, 10
        set I1, 20
        or I2, I1, I0
        print I2
        print "\n"
        set I1, 0
        or I2, I1, I0
        print I2
        print "\n"
        end

  prints:
  
  20
  10

  which is what the documentation leads me to expect. On the other hand,
  this code (which is the same as the above, but using PerlInts instead
  of native ints):

        new P0, .PerlInt
        new P1, .PerlInt
        new P2, .PerlInt
        set P0, 10
        set P1, 20
        or P2, P1, P0
        print P2
        print "\n"
        set P1, 0
        or P2, P1, P0
        print P2
        print "\n"
        end

  prints:

  1
  1

  Moreover, PerlNums behave like PerlInts, while PerlStrings behave like
  native ints.

  Clearly there's a bug here, since the behaviour should be consistent;
  my question is which is the correct behaviour? The documentation 
  suggests the former, but official confirmation of this would be good.
  
  Simon



Reply via email to