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


Code says it all:

$ cat w.pir
.sub main
    $P0 = new 'Integer'
    $P0 = 2147483600

  test_10:
    print $P0
    print " is"
    if $P0 > -10 goto skip_10
    print " not"
  skip_10:
    say " greater than -10"

  test_1000:
    print $P0
    print " is"
    if $P0 > -1000 goto skip_1000
    print " not"
  skip_1000:
    say " greater than -1000"
.end
$ ./parrot w.pir
2147483600 is greater than -10
2147483600 is not greater than -1000
$


I suspect the problem is that the integer "greater than" operation
is performing a subtraction between the two (signed long) values 
being compared, but the result of the subtraction is outside of 
the range of signed longs.

Pm

Reply via email to