• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Variables > Types of Values

2.4. Types of Values

The data we use in ActionScript programming comes in a variety of types. So far, we've seen numbers and text, but other types include Booleans, arrays, functions, and objects. Before we cover each datatype in detail, let's examine some datatype issues that relate specifically to variable usage.

2.4.1. Automatic Typing

Any ActionScript variable can contain any type of data, which may seem unremarkable, but the ability to store any kind of data in any variable is actually a bit unusual. Languages like C++ and Java use strictly typed variables; each variable can accept only one type of data, which must be specified when the variable is declared. ActionScript variables are automatically typed; when we assign data to a variable, the interpreter sets the variable's datatype for us.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint