home *** CD-ROM | disk | FTP | other *** search
-
- FILE MATCHCH.DOC. 11/18/84 1
-
-
-
-
- NAME
- match_char -- match a character in a string
-
- SYNOPSIS
-
- match_char(match_str, ifirst, target_char, match_spec)
-
- str255: STRING[255]. A TYPE which must be declared before you INCLUDE
- the function.
- match_str: str255. String to search.
- ifirst: INTEGER. Index of start of search.
- target_char: BYTE. ORD of character to compare.
- match_type: (next_match, last_match, next_unmatch, last_unmatch)
- next_match- find first matching character after ifirst.
- last_match- find last matching character before ifirst.
- next_unmatch- find first non-matching character after ifirst.
- last_unmatch- find last non-matching character before ifirst.
- match_char: INTEGER. If the find succeeds, its index. If not, 0.
-
- DESCRIPTION
- The find starts with ifirst. If it meets the condition (match or
- unmatch, match_char = ifirst. If not, the index increases (next) or
- decreases (last) until either the find succeeds or it runs off the string.
- If it runs off the string, match_char = 0.
- match_char is moderately forgiving for ifirst. If the direction is
- up (next), it starts at the beginning of the string for a nonpositive
- ifirst. If the direction is down, it starts at the end of the string for
- ifirst too big.
-
- NOTE: These functions use MARK and RELEASE to handle the dynamic
- heap. As a result, any program which uses one of them can not use
- DISPOSE.
-
- L. Paper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-