Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-10-25 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (147 votes), past polls