Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 08-17-2010, 07:05 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by xXziroXx View Post
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.
__________________
Skyld
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.