Hi,
I'm running a recent version of Cygwin (3 or 4 months old) and the perl that came with it (version 5.8.7). I am surprised by this:
Rob@desktop ~/pscrpt
$ perl -MDevel::Peek -e "Dump(2 ** 43 + 12345);"
SV = IV(0x4e9908) at 0x4d0f80
REFCNT = 1
FLAGS = (PADBUSY,PADTMP,IOK,READONLY,pIOK)
IV = 8796093034553
I expected something like:
SV = NV(0x8a1fd4) at 0x3f51d4
REFCNT = 1
FLAGS = (PADBUSY,PADTMP,NOK,READONLY,pNOK)
NV = 8796093034553
which is what I get on linux and native Win32 perls 5.8.8 (and earlier). Actually, linux doesn't set the PADBUSY or PADTMP flags, but I'm not concerned with that.
Is that Cygwin representation acceptable ?
I'm thinking it's unacceptable to put, into the IV slot, an integer that's too large for the 'long' type to handle. And shouldn't it be declaring itself as an 'NV' and setting the 'NOK' flag instead of 'IOK' ?
What are the rules regarding this (if there are any) ?
Also, is this some special Cygwin feature that the Cygwin developers have implemented by modifying the perl source - or would I find exactly the same behaviour if I built perl on Cygwin using official perl source ? (That question's a bit OT - if no-one here knows the answer I'll take more appropriate steps to find out.)
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.