in reply to Re^3: Can I access and use UV types from perl?
in thread Can I access and use UV types from perl?
The negative numbers come out as UV's but the positive numbers come out as IV's
for( -1 .. 1) { print s2u($_), "\n"; } sub s2u { Dump sprintf("%u", $_[0]) + 0; } =head1 output SV = IV(0x732998) at 0x73299c REFCNT = 1 FLAGS = (PADTMP,IOK,pIOK,IsUV) UV = 4294967295 SV = IV(0x732998) at 0x73299c REFCNT = 1 FLAGS = (PADTMP,IOK,pIOK) IV = 0 SV = IV(0x732998) at 0x73299c REFCNT = 1 FLAGS = (PADTMP,IOK,pIOK) IV = 1 =cut
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Can I access and use UV types from perl?
by syphilis (Archbishop) on Nov 18, 2019 at 00:31 UTC |