CS372
REVIEW for Test 2
on March 26, 1998
Test is closed book
primarily Chapters 5 - 8
- Chapter 5: Data Types
- single value
-
primitive data types (largely built into the CPU)
integer, floating point, decimal, boolean
string
- ordinal types (user defined)
subrange
- pointers
- collections of values
- arrays
- records
- unions (reuse of space with different type values -
used for system type problems)
- sets
- Chapter 6: Expressions and Assignment
- operators
precedence,
short circuit evaluation
(relational operators - boolean)
- types
type conversion ( coercion, casting),
overloading,
assignment,
- Chapter 7: Statement-Level Control Structures
- ML & ASM - goto and conditional goto
- goto and labels
- IF, IF-THEN-ELSE, SELECT/SWITCH/CASE, LOOP,
- break, exit, continue
- guarded commands
- Chapter 8: Subprograms
- basic concept - single entry, single exit, named entity
- sequential execution (caller/called)
- parameters (definition and binding)
- parameter passing:
call by value,
call by value return (copy),
call by reference,
call by name
(book's pass-by-result, pass-by-value-result)
- type checking (and general error testing)
- generic subprograms
- functions (returns value, what types permitted)
- functions as relational operators for operator overloading
Programming Languages (and Notations)
- Prolog
declarative language,
backtracking search, variable binding (allows use of
parameter as either input or output),
- m4 macro processor
- Unix pipes