Chapter 5 Flashcards
Names, Bindings & Scopes (44 cards)
___ ___ 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
If the binding first occurs during run time or can change in the course of program execution, it is called ___
dynamic
An ___ ___ is a statement in a program that lists variable names and specifies that they are a particular type.
explicit declaration
An ___ ___ is a means of associating variables with types through default conventions, rather than declaration statements.
implicit declaration
The memory cell to which a variable is bound somehow must be taken from a pool of available memory; this process is called ___
allocation
___ is the process of placing a memory cell that has been unbound from a variable back into the pool of available memory.
Deallocation
The ___ of a variable is the time during which the variable is bound to a specific memory location.
lifetime
A ___ ___ is one that is bound to a memory cell before program execution begins and remains bound to that same memory cell until program execution terminates.
static variable