Using Mathematical Operators : Arithmetic Operators : Language Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Language » Arithmetic Operators »

 

Using Mathematical Operators


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var quantity:Number = 5;
        trace(quantity++);  // Displays: 5
        trace(quantity);    // Displays: 6
        
        var quantity:Number = 5;
        trace(++quantity);  // Displays: 6
        trace(quantity);    // Displays: 6
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Language
» Arithmetic Operators