in reply to Re: log() and int() problem
in thread log() and int() problem
And internally floats are stored in the string-slot of a variableNo they're not. An xpvnv has separate slots for an int, a float and a string:
[davem@pigeon bleed]$ p -MDevel::Peek -e'$x=1; $x=2.2; $x = "three"; D +ump $x' SV = PVNV(0x1ae3150) at 0x1b021d0 REFCNT = 1 FLAGS = (POK,pPOK) IV = 1 NV = 2.2 PV = 0x1afb360 "three"\0 CUR = 5 LEN = 16
Dave.
In Section
Seekers of Perl Wisdom