VERIFY — Scan a string for characters not a given set#
-
VERIFY(STRING, SET, BACK, KIND)#
Verifies that all the characters in
STRINGbelong to the set of characters inSET.- Parameters:
STRING – Shall be of type
CHARACTER.SET – Shall be of type
CHARACTER.BACK – (Optional) shall be of type
LOGICAL.KIND – (Optional) An
INTEGERinitialization expression indicating the kind parameter of the result.
- Returns:
The return value is of type
INTEGERand of kindKIND. IfKINDis absent, the return value is of default integer kind.
- Standard:
Fortran 90 and later, with
KINDargument Fortran 2003 and later- Class:
Elemental function
- Syntax:
RESULT = VERIFY(STRING, SET[, BACK [, KIND]])
- Example:
PROGRAM test_verify WRITE(*,*) VERIFY("FORTRAN", "AO") ! 1, found 'F' WRITE(*,*) VERIFY("FORTRAN", "FOO") ! 3, found 'R' WRITE(*,*) VERIFY("FORTRAN", "C++") ! 1, found 'F' WRITE(*,*) VERIFY("FORTRAN", "C++", .TRUE.) ! 7, found 'N' WRITE(*,*) VERIFY("FORTRAN", "FORTRAN") ! 0' found none END PROGRAM
- See also:
SCAN — Scan a string for the presence of a set of characters, index-intrinsic