CPS 1 - Spring, 1997 - Ramm 2/21/97 #16
- Announce
- Last Quiz, Last problem messed up
- Midterm Exam Next Wednesday
- Review Sessions Tuesday, 7:00pm
Chapter 4. Top Down Programming, Subroutine, & a Database Application
- Using a Procedure
- procedurename(parm1, parm2, ...);
- "CALL" procedurename; {other languages}
- Using functions
- Writing a "Trivial" Procedure
- "leave space"
- "copyright notice"
- Adding Flexibility and Power with Parameters
- copyright with name
- copyright with name and date
- Formal Parameters/Arguments
- by position, not name
- names may or may not match
- types must match
- number of parameters must match
- Procedure With Loop
- Can use loops and other language features
inside of procedure
diamond.pas
- Using Procedures in Procedures
- Interactive Example
- find volume of cylinder
- write in class
cylvol.pas