+ (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)