[UP]


Manual Reference Pages  - verify (3)

NAME

verify(3f) - [FORTRAN:INTRINSIC:CHARACTER] Scan a string for the absence of a set of characters

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also

SYNTAX

result = verify(string, set[, back [, kind]])

DESCRIPTION

Verifies that all the characters in STRING belong to the set of characters in 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 STRING are found in SET, the result is zero.

ARGUMENTS

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.

RETURN VALUE

The return value is of type INTEGER and of kind KIND. If KIND is absent, the return value is of default integer kind.

EXAMPLE

Sample program:

   program demo_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 demo_verify

STANDARD

[[Fortran 95]] and later, with KIND argument [[Fortran 2003]] and later

CLASS

Elemental function

SEE ALSO

Functions that perform operations on character strings, return lengths of arguments, and search for certain arguments:
Elemental:
  ADJUSTL, ADJUSTR, INDEX, LEN_TRIM, SCAN, VERIFY;
Nonelemental:
  REPEAT, TRIM


verify (3) March 19, 2019
Generated by manServer 1.08 from 8b7b4b40-1ebb-459b-a318-7219975c9f19 using man macros.