Quote:
Originally Posted by xXziroXx
Definitely. Just because a string STARTS with numbers doesn't mean it's a number.
|
This is intentional since it allows extra notation to be correctly parsed:
PHP Code:
echo(float("1.0e4")); // 10000
echo(float("0xBC")); // 188
GScript is behaving in this case completely as expected, and this is the same as in JavaScript and a lot of other dynamically/variantly typed languages, so no, it can't be changed without breaking it's intended functionality.
If this is a problem then you should validate your input before processing.