Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by derby (Abbot)
on Sep 06, 2011 at 20:45 UTC ( #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
Node Status?
node history
Node Type: note [id://924462]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-12-21 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls