Clicky
Showing changes from revision #3 to #4:
(追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)
Verifies that all the characters in(削除) a (削除ここまで)string
(削除) are (削除ここまで)(追記) belong (追記ここまで)(削除) present (削除ここまで)(追記) to (追記ここまで)(追記) the (追記ここまで)(追記) set (追記ここまで)(追記) of (追記ここまで)(追記) characters (追記ここまで) in(削除) a (削除ここまで)set
.
If 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
(追記) are found in (追記ここまで)(追記) set
(追記ここまで), the result is zero.
(削除) Fortran 95 and later, with (削除ここまで)(追記) Fortran 95 (追記ここまで)(追記) and later, with (追記ここまで)kind
argument(削除) Fortran (削除ここまで)(削除) 2003 (削除ここまで)(削除) and (削除ここまで)(削除) later (削除ここまで)(追記) Fortran 2003 (追記ここまで)(追記) and later (追記ここまで)
Elemental function
result = verify(string, set[, back [, kind]])
result = verify(string, set[, back [, kind]])
(追記ここまで)
string
- Shall be of type character
.set
- Shall be of type character
.back
- (Optional) shall be of type logical
.kind
- (Optional) An integer
initialization expression indicating the kind parameter of the result.The return value is of type integer
and of kind kind
. If kind
is absent, the return value is of 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