Arithmetic Operators in Actionscript : Arithmetic Operators : Language Flash / Flex / ActionScript examples


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

 

Arithmetic Operators in Actionscript


 

Operator     Name                Example     
+            Plus                x + y       
-            Minus/Negation      x - y       
*            Multiply            x*y       
/            Divide              x/y       
%            Modulo              x%y       

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var nYear:Number = 2004;
        trace(nYear % 4)// Displays: 0
        
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Language
» Arithmetic Operators