Verify that a set of characters
contains all the characters in a string by identifying the position
of the first character in a string of characters that does not appear
in a given set of characters.
Class
Elemental function
Argument type and attributes
STRING
An INTENT(IN) CHARACTER
SET
An INTENT(IN) CHARACTER with the same kind type
parameter as STRING.
BACK (optional)
An INTENT(IN) LOGICAL
KIND (optional)
An INTENT(IN)INTEGER scalar.
The actual argument corresponding to KIND must
be a constant expression.
Result type and attributes
It is of type integer
If KIND is present, the KIND type
parameter is that specified by the value of KIND;
otherwise, the KIND type parameter is that
of default integer type.
Result value
Case (i): If BACK is absent or present with the value .FALSE. and
if STRING contains 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.
Case (ii): If BACK is present with the value .TRUE. and
if STRING contains 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.
Case (iii): The value of the result is zero if each character
in STRING is in SET or if STRING has zero length.
Examples
Case (i): VERIFY ('ABBA', 'A') has the value 2.
Case (ii): VERIFY ('ABBA', 'A', BACK = .TRUE.) has the
value 3.
Case (iii): VERIFY ('ABBA', 'AB') has the value 0.