Previous: chrlen Up: ../chrrtn.html Next: chrmov
INTEGER FUNCTION CHRMAT (TEXT,LENTXT,PATERN,LENPAT) (Match Characters) Search the string defined by TEXT,LENTXT for the first character which is contained in the pattern string defined by PATERN,LENPAT. If either LENTXT or LENPAT is less than 1, return 0. If all characters in the first string are absent in PATERN(*), return 0. Otherwise return the index of the first matching character in TEXT(*). Thus CHRMAT always returns a value .GE. 0. It is important to note that the index returned points to a character in the first string, not to one in the pattern string.