start page | rating of books | rating of authors | reviews | copyrights

Book HomeActionScript: The Definitive GuideSearch this book

Chapter 4. Primitive Datatypes

Contents:

The Number Type
Integers and Floating-Point Numbers
Numeric Literals
Working with Numbers
The String Type
Working with Strings
The Boolean Type
Undefined
Null
Onward!

Primitive data consists of simple characters or keywords such as the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, or the strings "a", "b", "c". As we learned in the previous chapter, the primitive datatypes supported by ActionScript are number, string, boolean, undefined, and null. In this chapter we'll learn how to define, examine, and change data of each type.

4.1. The Number Type

Numbers are used for counting, mathematics, and to keep track of numeric properties in our movies (like the current frame of a movie clip or its location on the Stage). Let's see how numbers are defined and manipulated in ActionScript.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.