Description:
Increment a character
pointer, IPOSN, either forward or backward through a string, until the character pointed to is one of a
specified set of characters. The direction of the search is given by the argument FORWD. If no such
character position exists (i.e. none of the remaining characters in the string are members of the
specified set), the pointer is returned set to one more than the length of the string if the search is in the
forward direction, or zero if the search is in the reverse direction. If the initial value of IPOSN does not
point at one of the characters in the string, then the routine will return without action.
Invocation
CALL CHR_TOCHR( CHARS, STRING, FORWD, IPOSN )
Arguments
CHARS = CHARACTER
∗ (
∗ )
(Given)
A string consisting of the set of characters to be searched for.
STRING = CHARACTER
∗ (
∗ )
(Given)
The string to be searched.
FORWD = LOGICAL (Given)
The search direction: if
.TRUE. then proceed through the string in a forward direction, otherwise work backwards
through the string.
IPOSN = INTEGER (Given and Returned)
The character pointer.
Copyright © 2018 East Asian Observatory