<?xml version="1.0" encoding="windows-1252"?>
<node id="947359" title="Re: emulate 32-bit on perl 64" created="2012-01-11 10:16:43" updated="2012-01-11 10:16:43">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt; How can I force it to work correct on perl based 64 ?&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;It gets very messy. 

&lt;P&gt;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.&lt;code&gt;
C:\test&gt;\perl32\bin\perl -le"print 11 | 29 | ~15"
4294967295

C:\test&gt;\perl64\bin\perl -le"print 11 | 29 | ~15"
18446744073709551615

C:\test&gt;\perl64\bin\perl -le"print 11 | 29 | ( ~15 &amp; 0xffffffff )"
4294967295
&lt;/code&gt;

&lt;p&gt;And if you are manipulating signed rather than unsigned values it gets really tiresome.

&lt;p&gt;I don't know of a good solution to this problem.

&lt;div class="pmsig"&gt;&lt;div class="pmsig-171588"&gt;
&lt;hr /&gt;
&lt;font size=1 &gt;
&lt;div&gt;With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'&lt;/div&gt;
&lt;div&gt;Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.&lt;/div&gt;
&lt;div&gt;"Science is about questioning the status quo. Questioning authority". &lt;/div&gt;
&lt;div&gt;In the absence of evidence, opinion is indistinguishable from prejudice.
&lt;p align=right&gt;[http://www.theregister.co.uk/2011/11/29/sas_versus_world_programming/|The start of some sanity?]&lt;/p&gt;&lt;/div&gt;
&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
947353</field>
<field name="parent_node">
947353</field>
</data>
</node>
