|
or an association between an attribute and an entity, or
|
Page | 3/16 | Date | 18.02.2022 | Size | 396.24 Kb. | | #58269 |
| 13516098 between an operation and a symbol
Example:
int count;
count = count + 5;
- - set of possible types for count: bound at language design time
- - type of count: bound at compile time
- - set of possible values of count: bound at language implementation time -- value of count: bound at execution time
- - set of possible meaning for the operator +: bound at language design
time
- - Meaning of the operator symbol '+': bound at compile time
- - Internal representation of literal 5: bound at language implementation
time
Binding of Attributes to Variables - Static: A binding is static if it first occurs before run time and remains unchanged throughout program execution.
- Dynamic: A binding is dynamic if it first occurs during execution or can change during execution of the program
Type Binding
- How is a type specified?
- When does the binding take place?
Before a variable can be referenced in a program it must be bound to a type. We have two key issues in binding a type to an identifier
•A variable must be bound to a data type
before it can be referenced
•When does the binding take place?
–static or dynamic binding
Static Type Binding
Dynamic Type Binding
Share with your friends: |
The database is protected by copyright ©ininet.org 2024
send message
|
|