When the number is treated base-10, conversion stops when a non-numeric character is encountered : ParseInt : Data Type Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Data Type » ParseInt »

 

When the number is treated base-10, conversion stops when a non-numeric character is encountered


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        // The number is treated as a decimal, not a hexadecimal number
        trace(parseInt("0x12"10));   // Displays: 0 (not 12 or 18)
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Data Type
» ParseInt