KPG_NXWRD

Finds the next word in a string

Description:

The routine looks for the start of the next word, after OFFSET characters, in the given string. Words are assumed to be delimetered by spaces, commas or tabs. The routine is really a wrap round calls to CHR_FIWE and CHR_FIWS trapping any status returns.

Invocation

CALL KPG_NXWRD( STRING, OFFSET, FIRST, LAST, NOTFND, STATUS )

Arguments

STRING = CHARACTER ( ) (Given)
The string to be searched for a word . The word is looked for in STRING(OFFSET:).
OFFSET = INTEGER (Given)
The offset into the given string after which the word is to located.
FIRST = INTEGER (Returned)
First character of the located word. Offset into STRING.
LAST = INTEGER (Returned)
Last character of the located word. Offset into STRING.
NOTFND = LOGICAL (Returned)
If a next word is not located then this is set true, otherwise it is set false.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: