Decimal Numbers : Number : Data Type Flash / Flex / ActionScript examples


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

 

Decimal Numbers


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var nDecimalOne:Number = 1.23e+2;  // results in 123
        var nDecimalTwo:Number = 1.23e-2;  // results in 0.0123
        
        trace(nDecimalOne);
        trace(nDecimalTwo);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Data Type
» Number