< previous page page_884 next page >

Page 884
Get Current Date (Out: currentDate)                                                                               Level 1
Prompt user for current date
Read month, day, year
currentDate.Set(month, day, year)

Get Entry (Inout: friendFile; Out: entry)
Read entry.firstName from friendFile
IF EOF on friendFile
   Return
Read entry.lastName from friendFile

// Below, dummy is a char variable to consume the ( and )
Read dummy, entry.phone.areaCode,
     dummy, entry.phone.number from friendFile

// Below, dummy consumes the / and /
Read month, dummy, day, dummy, year from friendFile

entry.birthDate.Set(month, day, year)

Print Entry (In: entry, birthday)
Print entry.firstName,  , entry.lastName
Print (, entry.phone.areaCode, ), entry.phone.number
birthday.Print()

Because the DateType member functions (Increment, ComparedTo, and so on) already exist, no more decomposition is necessary.

 
< previous page page_884 next page >