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

Chapter 8. Welcome to ActionScript 2.0 > Strict Data Typing Variables

Strict Data Typing Variables

Another great feature in ActionScript 2.0 is strict data typing. Strict data typing is the ability to declare the data type of a variable when that variable is initialized. This helps a great deal in debugging large applications. For instance, if you have a login variable that will hold the user's login name as a string, you do not want it accidentally changing to a number or hexadecimal color by accident later in the code.

In ActionScript 1.0, it was possible to have a variable change data types constantly through an application. This is not good coding practice.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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