96
Flash Lite Operators
Example
Usage 1: The following statement multiplies the integers 2 and 3:
2 * 3
The result is 6, which is an integer.
Usage 2: The following statement multiplies the floating-point numbers 2.0 and 3.1416:
2.0 * 3.1416
The result is 6.2832, which is a floating-point number.
+ (numeric add)
Availability
Flash Lite 1.0.
Usage
expression1
+
expression2
Operands
expression1, expression2
Numbers.
Description
Operator; adds numeric expressions. The
+
is a numeric operator only; it cannot be used for
string concatenation.
If both expressions are integers, the sum is an integer; if either or both expressions are floating-
point numbers, the sum is a floating-point number.
Example
The following example adds the integers 2 and 3; the resulting integer, 5, appears in the
Output panel:
trace (2 + 3);
The following example adds the floating-point numbers 2.5 and 3.25; the result, 5.75, a
floating-point number, appears in the Output panel:
trace (2.5 + 3.25);
See also
add (string concatenation)
Summary of Contents for FLASH 8-FLASH
Page 1: ...Flash Lite 1 x ActionScript Language Reference...
Page 6: ...6 Contents...
Page 46: ...46 Flash Lite Global Functions...
Page 62: ...62 Flash Lite Properties...
Page 76: ...76 Flash Lite Statements...
Page 110: ...110 Flash Lite Operators...
Page 162: ...162 Index...