Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: What is the distinction between IV and NV variables?

by derby (Abbot)
on Sep 06, 2011 at 20:45 UTC ( [id://924462]=note: print w/replies, xml ) Need Help??


in reply to What is the distinction between IV and NV variables?

Perl tries to do the right thing and if it thinks the integer addition may cause an overflow, it will create the NV slots and use fp arithmetic. You can follow through the perl source (sv.c and/or pp_hot.c) but I believe what you're seeing is perl dropping the string '0' into the case of not causing an overflow and '' into the default possible overflow case.

-derby
  • Comment on Re: What is the distinction between IV and NV variables?

Log In?
Username:
Password:

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

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

    No recent polls found