VERIFY intrinsic function
Standard: F77 F90 F95 F2003 F2008
  Example Program


STRING : Character, any kind;
SET : same type and kind as STRING;
BACK : Logical;
KIND : scalar Integer constant expression;

Result : Integer or Integer(Kind=KIND).


Searches STRING for an occurrence of any character that is not in SET. If BACK is absent, or present with the value .FALSE., the search begins at the start of STRING; if BACK is present with the value .TRUE., the search begins at the end of STRING.

If every character in STRING also appears in SET, the value zero is returned. If STRING has length zero, there can be no characters found and therefore zero will be returned.

Like many intrinsic functions, this is elemental; if any of STRING, SET or BACK is an array, the result is also an array with the same shape and the operation being applied elementwise. Note that all array arguments must have the same shape.

In the unlikely event of the string being longer than 2GB, the KIND argument should be used to specify a 64-bit integer kind for the result.

CHARACTER type, INDEX intrinsic function, SCAN intrinsic function.