Data Control
Data Control
Central problem:
Example: x = y + 2*z;
Defined types
Defined constants
Labels
Exception names
Primitive operations
Literal constants
For example:
Global variables
Subprogram declared in main program
Predefined referencing
environment
It is a set of identifier association defined directly
in the language definition that may be used
without explicitly creating them.
For example:
Lifetime:
1. Static scope
2. Dynamic scope
Static scope:
Importance:
Advantages:
subprograms.
Dynamic Scope
Disadvantages:
Block-structured languages :
Declaration of X
Declaration of Y
Use of Z Hidden to A
Local Data and Local Referencing
Environments
Local environment of a subprogram:
various identifiers declared in the subprogram :
variables, parameters, subprogram
names.