PL QUIZ 1 - Sheet1 Flashcards
(105 cards)
primary design issues for names
- Are names case sensitive?
- Are the special words of the language reserved words or keywords?
a string of characters used to identify some entity in a program.
name
used to make programs more readable by naming actions to be performed
special words
a word of a programming language that is special only in certain contexts
keyword
a special word of a programming language that cannot be used as a name
reserved word
When more than one variable name can be used to access the same memory location, what is it called?
aliases
determines the range of values the variable can store and the set of operations that are defined for values of the type
Type
the contents of the memory cell or cells associated with the variable
value
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
binding where it first occurs before run time begins and remains unchanged throughout program execution
static
the binding first occurs during run time or can change in the course of program execution
dynamic
a statement in a program that lists variable names and specifies that they are a particular type
explicit declaration
a means of associating variables with types through default conventions, rather than declaration statements
implicit declaration
the process of taking a memory cell to which a variable is bounded from a pool of available memory
allocation
process of placing a memory cell that has been unbound from a variable back into the pool of available memory.
Deallocation
the time during which the variable is bound to a specific memory location
lifetime
variables that are bound to memory cells before program execution begins and remain bound to those same memory cells until program execution terminates
static variables
variables whose storage bindings are created when their declaration statements are elaborated, but whose types are statically bound
stack-dynamic variables
nameless (abstract) memory cells that are allocated and deallocated by explicit run-time instructions written by the programmer
explicit heap-dynamic variables
bound to heap storage only when they are assigned values
implicit heap-dynamic variables
the range of statements in which the variable is visible.
scope of a variable
based on the calling sequence of subprograms, not on their spatial relationship to each other
dynamic scoping
the collection of all variables that are visible in the statement
referencing environment
a variable that is bound to a value only once
named constant