Type Checking, Storage Management, Elementary Types
Static type checking
- Number, order, and types of all arguments and results
- data type of every object described by variable name
- type of each constant
- choices?
- leave type unchecked
- flag error and use exception handler
- coercion (type change)
Dynamic type checking
- type information must be kept during execution
- must be done using software
Storage management
- storage allocation
- access path creation
garbage -- lose path, before storage retrieved
dangling reference -- recover storage and fail to destroy path
Data Representation:
- bit: 0, 1
(two values)
- byte == 8 bits
2^8
- word
Elementary Types
Boolean
char: byte -- 256
- creation
- deletion
- equality (= or ==)
- assignment (:= or =)
- ord(char)
- char(int)
integer:
- - (negation)
- remainder (mod or %)
binary representation - integers:
real:
- similar operations to integer
binary representation - reals:
Return to CIS 350 Index Page