• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Actionscript Syntax > Using Numeric Variables

Using Numeric Variables

Numbers are the lifeblood of any programming task. Everything you see on the screen of your computer is represented by a number of some sort, and your planning process for any project probably includes a time when you try to determine how to represent some sort of data with a number. Flash 5 has greatly enhanced the types of things you can do with numbers.

Numeric Operations

Operations modify numeric values. Standard types of operations are + (addition), - (subtraction), * (multiplication), and / (division). These operators are used between two values as part of an expression, to represent another value. The computer replaces expressions during the execution of the program with the results of the calculation. For example, the expression 2 + 2 is replaced by 4 at the time the computer encounters it as part of a statement. ActionScript also includes the % (modulo) operator.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint