Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: use of hex-number in references

by Zaxo (Archbishop)
on Jun 09, 2004 at 01:08 UTC ( [id://362601]=note: print w/replies, xml ) Need Help??


in reply to use of hex-number in references

Yes, they are memory locations and could be more or less useful with a core file. It would take a good knowledge of perl implementation details to make that meaningful. A perl built with -DDEBUGGING is probably a better investment for such an investigation.

You can get the decimal address with print 0 | $ref;, which places $ref in numeric context. Since | acts on bitfields, $ref's target address is coerced into an unsigned integer.

After Compline,
Zaxo

Replies are listed 'Best First'.
•Re^2: use of hex-number in references
by merlyn (Sage) on Jun 09, 2004 at 01:17 UTC

      Yes, it makes no difference. It looks like a reference is always unsigned in numeric context, since 0+ gives the same result as 0|, while 0x8nnnnnnn would be negative taken as a 32 bit signed integer.

      After Compline,
      Zaxo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://362601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-26 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found