EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE - (Numeric Add)

MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE
162 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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)

Table of Contents

Related product manuals