The VERIFY function verifies that a set of characters contain all the characters in a string.
Syntax
VERIFY (string, set [, back] )
string is an INTENT(IN) scalar or array of type CHARACTER.
set is an INTENT(IN) scalar or array of type CHARACTER
back is an INTENT(IN) scalar or array of type LOGICAL.
If any or all the arguments are arrays, they must all have the same shape.
The result is of type default INTEGER.
If back is absent, or if it is present with the value false, the value of the result is the position number of the leftmost character in string that is not in set.
If back is present with the value true, the value of the result is the position number of the rightmost character in string that is not in set.
The value of the result is zero if each character in string is in set, or if string has length zero.
If one or more arguments are arrays, the result is an array of the same shape. The value of each element of the resulting array is as if the scalar SCAN operation were performed on each respective element of the input arrays.
Example
character(len=12) :: c1="Howdy there!" character(len=6) :: c2(2)=(/"Howdy ","there!"/) character(len=2) :: c3(2)=(/"de","gh"/) write(*,*) verify(c1,'de') ! writes 1 write(*,*) verify(c2,c3) ! writes 1 1 write(*,*) verify(c1,'de',back=.true.) ! writes 12 write(*,*) verify(c2,c3,(/.true.,.false./)) ! writes 6 1