CPS 1 - Spring, 1997 - Ramm 2/28/97 #18
- Announce
- Midterm Exam
- On Long Side
- Grading done, but not yet recorded
- Midterm Grades Turned In Today
- Based on Midterm Exam
- Modified based on quizzes and labs
- Sent in for all first years students
- Only F, D, and I (missed exam) for upperclassmen
Chapter 4. Top Down Programming, Subroutine, & a Database Application
- Review Arrays passed to Procedures
- Passing Array Argument to Procedure
- Gives procedure access to array
- Procedure modifies argument directly
procio.pas
- "Parallel" Arrays or "Corresponding" Arrays
- Model Phone Book Capability
- Array (of strings) for Names
- Array (of strings) for Phone Number
- Array (of strings) for Address
- Typical Access by Name
- For human use, ordered by name to speed access
- For computer use, may be fast enough for non ordered access
- Access by other Fields (other arrays)
- Can access by phone number and get name/address
- (like "phone -p 660-6532" on acpub system)
- Extend Idea to Database
- Generalization of phone book problem
- Can have many "parallel" arrays
- Basic Data Base Functions
- Load Data (Initialize Database)
- Print Data (Complete Printout)
- Query/Search (Selective Info Retrieval)
- Edit/Update (Update or Correct: Edit Database)
- Wild Card Retrieval
- Allows query to say "I don't care" for certain fields
- Simple Database Implementation
db.pas