If omitted, the radix is assumed to be 10, unless the string starts with 0x, 0X, or 0 : ParseInt : Data Type Flash / Flex / ActionScript examples


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

 

If omitted, the radix is assumed to be 10, unless the string starts with 0x, 0X, or 0


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        trace(parseInt("0x12"));     // The radix is implicitly 16. Displays: 18
        trace(parseInt("017"));      // The radix is implicitly 8. Displays: 15
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» ParseInt