Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: emulate 32-bit on perl 64

by BrowserUk (Patriarch)
on Jan 11, 2012 at 15:16 UTC ( [id://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?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 22:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found