!0

Dave Hodgkinson davehodg at gmail.com
Thu Feb 12 17:21:28 GMT 2009


On 12 Feb 2009, at 16:27, James Laver wrote:

> On Thu, Feb 12, 2009 at 4:03 PM, David Cantrell  
> <david at cantrell.org.uk> wrote:
>> On Thu, Feb 12, 2009 at 03:30:22PM +0000, James Laver wrote:
>>
>>> Although by rights it should be -1 on a twos complement machine.
>>> (For those who remember ones complement based numbers, or even know
>>> they existed).
>>
>> You're confusing logical not with bit-wise not:
>>
>> $ perl -e 'print "".(!0)."\n"'
>> 1
>> $ perl -e 'print "".(~0)."\n"'
>> 4294967295                        <-- 32-bit -1
>> $ perl64 -e 'print "".(~0)."\n"'
>> 18446744073709551615              <-- 64-bit -1
>>
>
> Okay, I may be stretching things a little far for comparatively crap
> humour, but I am aware of the difference.
>
> In any case, it wasn't funny, I'll drop it.



Did you butter its paws first?


-- 
Dave Hodgkinson                                MSN: davehodg at hotmail.com
Site: http://www.davehodgkinson.com                  UK: +44 7768 490620
Blog: http://davehodg.blogspot.com
Photos: http://www.flickr.com/photos/davehodg









More information about the london.pm mailing list