Of Programming Languages by Ravi Sethi
Of Programming Languages by Ravi Sethi
of Programming Languages
by
Ravi Sethi
TYPES:DATA REPRESENTATION
• Array Bounds
a) Computed at compile time (Static evaluation)
b) Computed at run time (Dynamic evaluation)
• Array Values and Initialization : a sequence of values for array elements
Example: int coin[] = { 1, 5, 10, 25, 50, 100 };
RECORDS: NAMED FIELDS
* Structural Equivalence
1. A type name is structurally equivalent to itself
2. Two types are formed by applying the same type constructor
3. After a type declaration, type n = T
TYPES AND ERROR CHECKING(cont’d)