Scoping Flashcards

1
Q

of a variable is a range of statements in which the variable is visible.

A

scope

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

A variable is visible in a statement if it can be … in that statement

A

referenced

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

What are the two scoping rules for name? 1

A
  1. Static scoping (Lexical scoping)
  2. Dynamic scoping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

is the method of binding names to nonlocal variables

A

Static scoping

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

is based on the calling sequence of subprograms, not on their spatial relationship to each other. Thus, the scope can be determine only at run time

A

Dynamic scoping

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

of statement is the collection of all variables that are visible in the statement

A

referencing environment

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

is a variable that is bound to a value only once; its value cannot be changed by an assignment or by an input statement

A

name constant

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

is the binding of a variable to a value at the time it is bound to a storage

A

Initialization

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