home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 9.1. Processing a "family" array.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- #define SURNAME 1
- #define PARENT 2
- #define CHILD 3
- #define SPOUSE1 2,1
- #define SPOUSE2 2,2
-
- function ListFamily(f_)
- local i
- if len(f_[PARENT]) = 1
- ? f_[SPOUSE1] +" " +f_[SURNAME]
- else
- ? f_[SURNAME] +": "
- ?? f_[SPOUSE1] +" and " +f_[SPOUSE2]
- endif
- if len(f_) > 2
- ? "Children:"
- for i := 1 to len(f_[CHILD])
- ?? " " +f_[CHILD, i]
- next i
- endif
- return nil
-
- // end of file CHP0901.PRG
-