Octal is treated as a decimal number, not an octal number : ParseInt : Data Type Flash / Flex / ActionScript examples


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

 

Octal is treated as a decimal number, not an octal number


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        // The number is treated as a decimal, not an octal number
        trace(parseInt("017",  10));   // Displays: 17 (not 15)
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» ParseInt