Parse number values from strings with bases other than 10 using the parseInt() function. : Number parse : Data Type Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Data Type » Number parse »

 

Parse number values from strings with bases other than 10 using the parseInt() function.


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var nOne:Number = parseInt("11"10);   // 11
        var nTwo:Number = parseInt("11"2);    // 3
        var nThree:Number = parseInt("gg"17);   // 288


    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» Number parse