Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 64

Programming actionscript 3.0
Table of Contents

Advertisement

When you store integer values with the Number data type, only the 52 bits of the significand
are used. The Number data type uses these 52 bits and a special hidden bit to represent
integers from -9,007,199,254,740,992 (-2
Flash Player uses the
also as the result of any operation that should return a number but does not. For example, if
you attempt to calculate the square root of a negative number, the result will be
special Number values include positive infinity and negative infinity
.
The result of division by
when the dividend is positive or
infinity
String data type
The String data type represents a sequence of 16-bit characters. Strings are stored internally as
Unicode characters, using the UTF-16 format. Strings are immutable values, just as they are
in the Java programming language. An operation on a String value returns a new instance of
the string. The default value for a variable declared with the String data type is
value
is not the same as the empty string (
null
absence of any characters.
uint data type
The uint data type is stored internally as a 32-bit unsigned integer and comprises the set of
integers from 0 to 4,294,967,295 (2
circumstances that call for non-negative integers. For example, you must use the uint data
type to represent pixel color values because the int data type has an internal sign bit that is not
appropriate for handling color values. For integer values larger than the maximum uint value,
use the Number data type, which can handle 53-bit integer values. The default value for
variables that are of data type uint is 0.
void data type
The void data type contains only one value,
was the default value for instances of the Object class. In ActionScript 3.0, the
undefined
default value for Object instances is
instance of the Object class, Flash Player will convert the value to
value of
to variables that are untyped. Untyped variables are variables that either
undefined
lack any type annotation, or use the asterisk (
only as a return type annotation.
64
ActionScript Language and Syntax
value not only as the default value for variables of type
NaN
is only
if the divisor is also
0
NaN
32
-1), inclusive. Use the uint data type for special
. If you attempt to assign the value
null
53
) to 9,007,199,254,740,992 (2
. Division by
0
when the dividend is negative.
-infinity
), even though they both represent the
""
. In previous versions of ActionScript,
undefined
) symbol for type annotation. You can use
*
53
).
Number
. Other
NaN
.
produces
0
. The
null
undefined
. You can only assign a
null
, but
to an
void

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flex

Table of Contents