Thread: float()
View Single Post
  #1  
Old 08-17-2010, 03:10 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
float()

Can anyone tell me if this is supposed to happen and if so, why?

PHP Code:
float(123) = 123
float
("123") = 123
float
("str") = -1
float
("str123") = -1
float
("123str") = 123 
Note the very last one. If a string starts with numbers, the float() command thinks it's a number, and I find this very annoying and misleading. If it is indeed a bug with the engine, could it be fixed please?
__________________
Follow my work on social media post-Graal:Updated august 2025.

Last edited by xXziroXx; 08-17-2010 at 03:22 AM..
Reply With Quote