9.3.162 VERIFY (STRING, SET [,BACK])

Description:  Verifies that a set of characters contains all the characters in a string by identifying the first character in the string that is not in the set.  
Class:  Elemental function; Generic 
Arguments:  STRING Must be of type character.  
  SET Must be of type character with the same kind parameter as STRING.  
  BACK (opt) Must be of type logical.  
Results:  The result type is default integer.

If BACK is omitted (or is present with the value false) and STRING has at least one character that is not in SET, the value of the result is the position of the leftmost character of STRING that is not in SET.

If BACK is present with the value true and STRING has at least one character that is not in SET, the value of the result is the position of the rightmost character of STRING that is not in SET.

If each character of STRING is in SET or the length of STRING is zero, the value of the result is zero.  

Examples

VERIFY ('CDDDC', 'C') has the value 2.

VERIFY ('CDDDC', 'C', BACK=.TRUE.) has the value 4.

VERIFY ('CDDDC', 'CD') has the value zero.


Previous Page Next Page Table of Contents