|
Summary: 4/21/2011
1
Chapter 7p
Data Types
What is a data type?
·A set of values
1
versus
·A set of values + set of operations on those values
Why data types?
· Data abstraction
Programming style
Modifiability enhance readability
· Type checking (semantic analysis) can be done at compile time -
Type checking is the process a translator goes through to determine
whether the type information is consistent
· Compiler uses type information to allocate space for variables
T l ti ffi i T i ( i ) b d t
2
· Translation efficiency: Type conversion (coercion) can be done at
|