Next: XOR, Previous: UNPACK, Up: Intrinsic Procedures
VERIFY
— Scan a string for the absence of a set of charactersIf BACK is either absent or equals FALSE
, this function
returns the position of the leftmost character of STRING that is
not in SET. If BACK equals TRUE
, the rightmost position
is returned. If all characters of SET are found in STRING, the
result is zero.
RESULT = VERFIY(STRING, SET[, BACK])
STRING | Shall be of type CHARACTER(*) .
|
SET | Shall be of type CHARACTER(*) .
|
BACK | (Optional) shall be of type LOGICAL .
|
INTEGER
and of the default
integer kind.
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