9.3.163 VERIFY (STRING, SET [, BACK] [, KIND])

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.  
  KIND (opt) Must be a scalar integer initialization expression.  
Results:  The result is of type integer. If KIND is present, the kind parameter of the result is that specified by KIND; otherwise, the kind parameter of the result is that of default integer. If the processor cannot represent the result value in the kind of the result, the result is undefined.

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