Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Difference between Perl and Java for << operator?

by GrandFather (Saint)
on Jul 30, 2021 at 04:00 UTC ( #11135511=note: print w/replies, xml ) Need Help??


in reply to Re: Difference between Perl and Java for << operator?
in thread Difference between Perl and Java for << operator?

It's an expected result if you assume signed 32 bit integer variables and your code is predicated on that assumption.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re^2: Difference between Perl and Java for << operator?

Replies are listed 'Best First'.
Re^3: Difference between Perl and Java for << operator?
by LanX (Sage) on Jul 30, 2021 at 08:28 UTC
    as I said

    > > take care that both sides are unsigned integers of same size.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      All integers are signed in Java. or at least they were a decade ago when I used it. It's one of the annoyances of the language.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135511]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2021-10-22 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?