cobol1.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
INSPECT (↑ Statements)
 ◄Key►                                       ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
 
  Verb:         INSPECT
 
  Function:     Counts, replaces, or converts occurrences of a
                character or group of characters in a data item.
 
  Syntax:       Which format?  ◄TALLYING►   REPLACING   ◄CONVERTING►
                               ◄TALLYING REPLACING►
 
     ►►─INSPECT identifier-1 REPLACING───►
 
        ┌──────────────────────────────────────────────────────────────┐
        │                               ┌──────────┐                   │
        ▼                               ▼          │                   │
     ►──┬─CHARACTERS BY─┬─identifier-5┬─┬──────────┬───────────────────┬─►◄
        │               └─literal-3───┘ └─phrase-1─┘                   │
        │                                                              │
        │            ┌───────────────────────────────────────────────┐ │
        │            │                                    ┌──────────┐ │
        │            ▼                                    ▼          │ │
        └┬─ALL─────┬─┬─identifier-3─┬─BY─┬─identifier-5─┬─┬──────────┬─┘
         ├─LEADING─┤ └─literal-1────┘    └─literal-3────┘ └─phrase-1─┘
         └─FIRST───┘
 
  where phrase-1 is:
 
     ►──┬─BEFORE─┬─┬───────┬─┬─identifier-4─┬──►
        └─AFTER──┘ └INITIAL┘ └─literal-2────┘
                                    -♦-