How many bytes does Perl use for standard integers? Could anyone also answer why<br>printf ("%u", -455); yields 4294966841?<br><br>Thank you
An integer is 2^32. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295. Since %u is unsigned, subtracting 455 from 0 would result in max(unsigned int) - 454 = 4294966841.<br><br>Sincerely,<br><br>Tom Anderson<br>CEO, Order amid Chaos, Inc.<br><A HREF="
Is that true for all platforms? (I'm thinking of my 64 bit HPUX box at work - will try it tomorrow)<br><br>Tom - why don't you get a TT userid? <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
It's true for C/C++, which is the basis for Perl. I believe it is the same across all platforms.<br><br>There, I got a userid. It seemed like too much trouble and I didn't really want to get sucked into another forum, but too late. <p> Sincerely,<br><a href=mailto: > </a><br><a href= tanderso@oac-design.com>Tom Anderson</a><br>CEO, Order amid Chaos, Inc.<br>
on AiX 4294966841<br>and on HPUX 4294966841<br>same on Win32, looks like same everywhere <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.