home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / MATCHCH.ZIP / MATCHCH.DOC next >
Encoding:
Text File  |  1985-12-28  |  1.8 KB  |  61 lines

  1.  
  2. FILE MATCHCH.DOC.  11/18/84                                                    1
  3.  
  4.  
  5.  
  6.  
  7. NAME
  8.      match_char -- match a character in a string
  9.  
  10. SYNOPSIS
  11.  
  12.      match_char(match_str, ifirst, target_char, match_spec)
  13.  
  14.      str255: STRING[255].  A TYPE which must be declared before you INCLUDE
  15.                            the function.
  16.      match_str: str255.  String to search.
  17.      ifirst: INTEGER.  Index of start of search.
  18.      target_char: BYTE.  ORD of character to compare.
  19.      match_type: (next_match, last_match, next_unmatch, last_unmatch)
  20.                   next_match- find first matching character after ifirst.
  21.                   last_match- find last matching character before ifirst.
  22.                   next_unmatch- find first non-matching character after ifirst.
  23.                   last_unmatch- find last non-matching character before ifirst.
  24.      match_char: INTEGER. If the find succeeds, its index.  If not, 0.
  25.  
  26. DESCRIPTION
  27.           The find starts with ifirst.  If it meets the condition (match or
  28.      unmatch, match_char = ifirst.  If not, the index increases (next) or
  29.      decreases (last) until either the find succeeds or it runs off the string.
  30.      If it runs off the string, match_char = 0.
  31.           match_char is moderately forgiving for ifirst.  If the direction is
  32.      up (next), it starts at the beginning of the string for a nonpositive
  33.      ifirst.  If the direction is down, it starts at the end of the string for
  34.      ifirst too big.
  35.  
  36.           NOTE: These functions use MARK and RELEASE to handle the dynamic
  37.      heap.  As a result, any program which uses one of them can not use
  38.      DISPOSE.
  39.  
  40. L. Paper
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.