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 reply to Re^2: log() and int() problem
by dave_the_m
in thread log() and int() problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |