Chapter 5 Flashcards
Names, Bindings & Scopes
___ ___ in programming languages are used to make programs more readable by naming actions to be performed.
Special words
A ___ ___ is a special word of a programming language that cannot be used as a name.
Reserved word
A program ___ is an abstraction of a computer memory cell or collection of cells.
variable
A variable is characterized by 6 attributes. What are they?
Name Address Value Type Lifetime Scope
The address of a variable is the ___ ___ address with which it is associated.
machine memory
When more than one variable name can be used to access the same memory location, the variables are called ___.
Aliases
The ___ of a variable determines the range of values the variable can store and the set of operations that are defined for values of the that ___.
Type
The ___ of a variable is the contents of the memory cell or cells associated with the variable
value
a variable’s value is sometimes called its ___ because it is what is required when the name of the variable appears in the right side of an assignment statement.
r-value
A ___ is an association between an attribute and an entity, such as between a variable and its type or value, or between an operation and a symbol.
binding
The time in which the associations with a variable are made are called its ___ time.
binding
IN: count = count + 5;
The type of count is bound at ___ time.
compile
IN: count = count + 5;
The set of possible values of count is bound at ___ ___ time.
compiler design
IN: count = count + 5;
The meaning of the operator symbol + is bound at ___ time, when the types of its operands have been determined.
compile
IN: count = count + 5;
The internal representation of the literal 5 is bound at ___ ___ time
compiler design
IN: count = count + 5;
The value of count is bound at ___ time with this statement.
execution
A binding is ___ if it first occurs before run time begins and remains unchanged through program execution.
static