KPG1_CNLIM

Parses a character string into integer bounds

Description:

This routine is used to parse a character specification which defines a range of integers. The specification is of the form:

Number[-number]

If the second number is specified then it is assumed that a sequence of numbers are to be parsed, e.g. 4-6 (or 6-4) specifies integers 4, 5, 6; and bounds 4 and 6 are returned. If only one number is specified, then both the returned bounds are set equal to it.

An asterisk may be used as a wildcard. Thus 5- specifies all numbers upwards from 5 inclusive, the upper bound being given by the largest integer. indicates all integers, i.e. the bounds would be the smallest (non-bad) and largest integers. -4 would specify a range from the smallest integer to 4 inclusive.

Invocation

CALL KPG1_CNLIM( NOS, FIRST, LAST, STATUS )

Arguments

NOS = CHARACTER ( ) (Given)
Number specification.
FIRST = INTEGER (Returned)
First integer in the sequence.
LAST = INTEGER (Returned)
Last integer in the sequence.
STATUS = INTEGER (Given and Returned)
Global status value.