Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Syntax and Language Fundamentals > About operators | |||
This section describes general rules about common types of operators, operator precedence, and operator associativity.
Operators are characters that specify how to combine, compare, or change values in an expression. An expression is any statement that Flash can evaluate and that returns a value. You can create an expression by combining operators and values or by calling a function. For more information on expressions, see About syntax, statements, and expressions.
For example, a mathematical expression uses numerical operators to manipulate the values you use. Examples of operator characters are +, <, *, and =. An expression consists of operators and operands, and they are any legal combination of ActionScript symbols that represent a value. An operand is the part of your code that the operator performs actions on. For example, in the expression x + 2, x and 2 are operands and + is an operator.
You use expressions and operators frequently throughout your code. You can combine operators and values to create an expression, or you can call a function.
|
NOTE |
|
This section describes how to use each type of operator; however, there isn't space to cover each one. For information on every operator, including special operators that don't fall into the following categories, see the ActionScript 2.0 Language Reference. |
The parts of your code that the operator performs actions on are called operands. For example, you can use the addition (+) operator to add values of a numeric literal. You could do this to add the value of a variable called myNum.
myNum + 3;
In this example, myNum and 3 are operands.
This section describes general rules about common types of operators, operator precedence, and operator associativity:
For information on operators, that do not fall into these categories, see the ActionScript 2.0 Language Reference, which contains information about all the operators you can use.
The following sections show you some common uses for operators. For more information on using many operators in a single code sample, see Using operators in a document.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000724.html