Summary
###########################################################################
File: indices.icn
Subject: Procedure to produce indices
Author: Ralph E. Griswold
Date: June 2, 1998
###########################################################################
This file is in the public domain.
###########################################################################
indices(spec, last)
produces a list of the integers given by the
specification spec, which is a common separated list
of either positive integers or integer spans, as in
"1,3-10, ..."
If last is specified, it it used for a span of
the form "10-".
In an integer span, the low and high values need not
be in order. For example, "1-10" and "10-1"
are equivalent. Similarly, indices need not be
in order, as in "3-10, 1, ..."
And empty value, as in "10,,12" is ignored.
indices() fails if the specification is syntactically
erroneous or if it contains a value less than 1.
###########################################################################
Procedures:
indices
This file is part of the (main) package.
Source code.
indices(spec, last)
: generate indices
This page produced by UniDoc on 2021/04/15 @ 23:59:54.