Syntax Flashcards

(49 cards)

1
Q

can be thought of as a template or a blueprint for a type of object.

A

class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

can include variables and constants, which hold data values, and methods, which are functions that encapsulate behavior bound to the class.

A

class definitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The values stored in properties can be_or other objects.

These are numbers, strings, or Boolean values.

A

primitive values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

contains a number of built-in classes that are part of the core language

A

ActionScript 3.0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

All classes, whether built-in or user-defined, derive from the _ class

A

Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Object data type is no longer the _ , even though all other classes still derive from it.

A

default data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In ActionScript 2.0, the following two lines of code were equivalent because the lack of a type annotation meant that a variable would be of type Object:

A

var someObj:Object;

var someObj;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ActionScript 3.0, however, introduces the concept of untyped variables, which can be designated in the following two ways:

A

var someObj:*;

var someObj;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

allow you to store values that you use in your program

A

Variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

To declare a variable, you must use the _ with the variable name.

A

var statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

the following line of ActionScript declares a variable named i:

A

var i;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Declaring a variable without designating the variable’s type is legal, but generates a compiler warning in _.

A

strict mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You designate a variable’s type by appending the variable name with a _, followed by the variable’s type

A

colon (:)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the following code declares a variable i that is of type int:

A

var i:int;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You can assign a value to a variable using the assignment _.

A

operator (=)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

the following code declares a variable i and assigns the value 20 to it:

A

var i:int; i = 20;
(or if more convenient)
var i:int = 20;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The technique of assigning a value to a variable at the time it is declared is commonly used not only when assigning primitive values such as integers and strings, but also when creating an _ or instantiating an instance of a class.

A

array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The following example shows an array that is declared and assigned a value using one line of code

A

var numArray:Array = [“zero”, “one”, “two”];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

You can create an instance of a class by using the _ operator

A

new

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The following example creates an instance of a class named Custom Class, and assigns a reference to the newly created class instance to the variable named custom Item:

A

var customItem:CustomClass = new CustomClass();

21
Q

If you have more than one variable to declare, you can declare them all on one line of code by using the _ to separate the variables

A

comma operator (,)

22
Q

the following code declares three variables on one line of code

A

var a:int, b:int, c:int;

23
Q

the following code declares three variables (a, b, and c) and assigns each a value

A

var a:int = 10, b:int = 20, c:int = 30;

24
Q

is the area of your code where the variable can be accessed by a lexical reference.

A

scope of a variable

25
variable that is defined in all areas of your code; a variable that you define outside of any function or class definition.
global variable
26
variable that is defined in only one part of your code
local variable
27
You declare a local variable by declaring the variable inside a _ - the smallest area of code for which you can define a local variable.
function definition
28
The primitive data types include Boolean, int, Null, Number, String, uint, and void. The ActionScript core classes also define the following complex data types: Object, Array, Date, Error, Function, RegExp, XML, and XMLList.
Data Type Descriptions
29
data type includes two values: true and false.
Boolean data type
30
default value of a Boolean variable that has been declared but not initialized
false
31
stored internally as a 32-bit integer and includes the set of integers from -2,147,483,648 (-231) to 2,147,483,647 (231 - 1), inclusive.
int data type
32
Previous versions of ActionScript offered only the _, which was used for both integers and floating-point numbers
Number data type
33
The default value for variables that are of the data type int
0
34
This is the default value for the String data type and all classes that define complex data types, including the Object class
null
35
can represent integers, unsigned integers, and floating-point numbers
Number data type
36
To store a floating-point number, include a _ in the number.
decimal point
37
This standard dictates how floating-point numbers are stored using the 64 available bits
IEEE Standard for Binary Floating-Point Arithmetic (IEEE-754)
38
In a 64- bit, one bit is used to designate whether the number is _
positive or negative
39
In a 64-bit, eleven bits are used for the _, which is stored as base 2
exponent
40
In a 64-bit, the remaining 52 bits are used to store the _, which is the number that is raised to the power indicated by the exponent.
significand (also called the mantissa)
41
is stored internally as a 32-bit unsigned integer and includes the set of integers from 0 to 4,294,967,295 (2^32 - 1), inclusive
uint data type
42
Use the uint data type for special circumstances that call for _
non-negative integers
43
The default value for variables that are of data type uint
0
44
The void data type contains only one value, _
undefined
45
In previous versions of ActionScript, _ was the default value for instances of the Object class
undefined
46
are variables that either lack any type annotation, or use the asterisk (*) symbol for type annotation
Untyped Variables
47
The _ is defined by the Object class
Object data type
48
serves as the base class for all class definitions in ActionScript.
Object Class
49
The following example shows two equivalent statements, both of which declare an untyped variable x
var x | var x:*