Chapter 5 Flashcards
What are the design issues related to names?
- Length
- Connector characters
- Case sensitivity
- Reserved words or keywords
- Some languages require the use of special characters to start their variables
What is the sextuple of attributes for a variable?
- Name
- Address
- Value
- Type
- Scope
- Lifetime
When considering the address of a variable, what is an alias?
Multiple names for the same address.
What are the two broad categories of binding?
- Static binding: Permanent assignment of an address during the execution of a program
- Dynamic binding: The address can change during execution
What is scope?
Where it is legal to reference a variable.
What is lifetime?
How long a variable exists in memory.
How is static scope used to determine the value of a variable?
The value of the variable is determined prior to execution.
How is dynamic scope used to determine the value of a variable?
The value is determined by subsequent function calls during runtime.
What is a referencing environment and how is it used to determine the value of a variable?
The combination of all of the names that are in scope at the point in the code where a name is used.