MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 120

Actionscript language reference
Table of Contents

Advertisement

-= (subtraction assignment)
Availability
Flash Player 4.
Usage
expression1 -= expression2
Parameters
expression1,expression2
Returns
A number.
Description
Operator (arithmetic compound assignment); assigns
. For example, the following two statements are equivalent:
expression2
x -= y;
x = x - y;
String expressions must be converted to numbers; otherwise,
For more information, see
Example
The following example uses the subtraction assignment (
assign the result to the variable
var x:Number = 5;
var y:Number = 10;
x -= y;
trace(x);
// output: -5
The following example shows how strings are converted to numbers:
var x:String = "5";
var y:String = "10";
x -= y;
trace(x);
// output: -5
See also
– (minus)
== (equality)
Availability
Flash Player 5.
Usage
expression1 == expression2
120
Chapter 5: ActionScript Core Language Elements
A number or expression that evaluates to a number.
"Operator precedence and associativity" on page
:
x
the value of
expression1
(not a number) is returned.
NaN
operator to subtract 10 from 5 and
-=)
expression1 -
32.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents