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

Book HomeActionScript: The Definitive GuideSearch this book

Chapter 3. Data and Datatypes

Contents:

Data Versus Information
Retaining Meaning with Datatypes
Creating and Categorizing Data
Datatype Conversion
Primitive Data Versus Composite Data
Onward!

Having worked with variable values in Chapter 2, "Variables", we've already had a casual introduction to data, the information we manipulate in our scripts. In this chapter, we'll explore data in more depth, learning how ActionScript defines, categorizes, and stores data. We'll also see how to create and classify data.

3.1. Data Versus Information

In the broadest sense, data is anything that can be stored by a computer, from words and numbers to images, video, and sound. All computer data is stored as a sequence of ones and zeros, which you might recognize from high-tech marketing materials:

010101010101010110101011011010101010101010000010101010101011010101010
101010101010101011101010101010101010101010101010111110101010101010101
010101010101010101010101011101010101010101010101010101010101010101010

Data is information in its crude state -- raw and meaningless. Information, on the other hand, has meaning. Consider, for example, the number 8008898969. As raw data it isn't very meaningful, but when we classify it semantically as the telephone number (800) 889-8969, the data becomes useful information.

In this chapter we'll see how to add meaning to raw computer data so that it becomes human-comprehensible information.



Library Navigation Links

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