Data Types in ActionScript

Notes:

Data Types in Action Script Programming Language:

playerScore= 10; // playerScore is number type of data
playerName=”Johny”; // playerName is string type of data
isGameOver=true; // isGameOver is boolean type of data

accountNumber=10; // accountNumber is number type of data
accountHName=”Tonny” // accountHName is string type of data
accountBalance=1000; // accountBalance is number type of data

Data type:
The name itself indicating, data type means type of data.
The data type also indicates the amount of memory to be allocated for specific type of data.
The data type also indicates the type of operations can be performed on specific type of data.

Types of data types:
There are 2 types of data types in Action Script.
1. Primitive or Basic or Value types
2. Non primitive or Derived or Reference types

Primitive data types: basic
Number (64bit == 8 bytes) : double precision floating point / real numbers
int (32bit == 4 bytes) : +ve & -ve integers / whole numbers including 0
unit (32bit == 4 bytes) : +ve integers / whole numbers including 0

String : sequence of (16 bit – 2 bytes) characters : (textual data)

Boolean (1 byte) : true (1) or false (0) : (Conditional result)

Non -Primitive data types: complex
Array: list of data values of any type
Date: represent date of the system
MovieClip: represents display object
RegExp: represents regular expression object
Sound: represents sound or audio object
Object: represents base class of all objects.