CAT_SRNG <t >

Get the rows corresponding to a range for a sorted column

Description:

Get the first and last rows in a catalogue for which the fields for a specified column lie in a given range.

A field is selected if it lies in the range:

field value .GE. MINRNG .AND. field value .LE. MAXRNG

The selection may be performed on either a genuine catalogue or some previous selection from a catalogue.

The specified column must be sorted in ascending or descending order (eventually the routine will be enhanced to work on indexed columns too).

If there are no rows in the specified range then FIRSTR and LASTR are returned both set zero.

Invocation

CALL CAT_SRNG <t > (CI, FI, MINRNG, MAXRNG; FIRSTR, LASTR; STATUS)

Arguments

CI = INTEGER (Given)
Input catalogue or selection from which the new selection is to be generated. Note that CI may be either a catalogue or a selection identifier.
FI = INTEGER (Given)
Identifier to the column whose fields will be selected to lie in the given range. The column must be sorted into ascending or descending order (and known by CAT to be so sorted).
MINRNG = <type > (Given)
Minimum value which a field must satisfy to be selected.
MAXRNG = <type > (Given)
Maximum value which a field must satisfy to be selected.
FIRSTR = INTEGER (Returned)
First row in the specified range.
LASTR = INTEGER (Returned)
Last row in the specified range.
STATUS = INTEGER (Given and Returned)
The global status.

Copyright

Copyright (C) 1999 Central Laboratory of the Research Councils

Bugs:

None known