home *** CD-ROM | disk | FTP | other *** search
- ;C
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ EXAMPLE # 1 ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ │
- │ THE INPUT FILE: "John Doe's List of Things to Do This Week" │
- │ │
- │ WHAT WE WANT: Extract from the file only those items that are not yet │
- │ done, according to a code indicating the status of each │
- │ task. │
- │ │
- │ HOW WE DO IT: We ignore any lines that contain a space, X or P in │
- │ column 2. This gives us what we want because: │
- │ │
- │ ─ A space is found in column 2 on all non-data lines │
- │ │
- │ ─ "X" is found there on items that are "Done" │
- │ │
- │ ─ "P" is found there on items that are "Postponed" │
- │ │
- └─────────────────────────────────────────────────────────────────────────────┘
-
- ;P
-