2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: VERIFY, string, find missing set
10 VERIFY --- Scan a string for characters not a given set
11 *******************************************************
13 .. function:: VERIFY(STRING, SET, BACK , KIND)
15 Verifies that all the characters in :samp:`{STRING}` belong to the set of
16 characters in :samp:`{SET}`.
19 Shall be of type ``CHARACTER``.
22 Shall be of type ``CHARACTER``.
25 (Optional) shall be of type ``LOGICAL``.
28 (Optional) An ``INTEGER`` initialization
29 expression indicating the kind parameter of the result.
32 The return value is of type ``INTEGER`` and of kind :samp:`{KIND}`. If
33 :samp:`{KIND}` is absent, the return value is of default integer kind.
36 Fortran 90 and later, with :samp:`{KIND}` argument Fortran 2003 and later
42 .. code-block:: fortran
44 RESULT = VERIFY(STRING, SET[, BACK [, KIND]])
47 .. code-block:: fortran
50 WRITE(*,*) VERIFY("FORTRAN", "AO") ! 1, found 'F'
51 WRITE(*,*) VERIFY("FORTRAN", "FOO") ! 3, found 'R'
52 WRITE(*,*) VERIFY("FORTRAN", "C++") ! 1, found 'F'
53 WRITE(*,*) VERIFY("FORTRAN", "C++", .TRUE.) ! 7, found 'N'
54 WRITE(*,*) VERIFY("FORTRAN", "FORTRAN") ! 0' found none
59 :ref:`index-intrinsic`