Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: emulate 32-bit on perl 64

by BrowserUk (Pope)
on Jan 11, 2012 at 15:16 UTC ( #947359=note: print w/ replies, xml ) Need Help??


in reply to emulate 32-bit on perl 64

How can I force it to work correct on perl based 64 ?

It gets very messy.

Effectively you have to mask the resultant from operation after any operation that might cause the resultant to be promoted to more than 32 bits. eg.

C:\test>\perl32\bin\perl -le"print 11 | 29 | ~15" 4294967295 C:\test>\perl64\bin\perl -le"print 11 | 29 | ~15" 18446744073709551615 C:\test>\perl64\bin\perl -le"print 11 | 29 | ( ~15 & 0xffffffff )" 4294967295

And if you are manipulating signed rather than unsigned values it gets really tiresome.

I don't know of a good solution to this problem.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re: emulate 32-bit on perl 64
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-08-29 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls