Subject: New Event Monitor Function: Index
Name: Nick Crookston
Date: 2004/06/10
Variants affected: All

Description: A new Event Monitor Function called Index has been created to
facilitate construction compact keyword files. Here is the functional
description:

Index (Arg1, ListElement1, ListElement2,..., ListElementN)

Consider second through last arguments of this function as a list of
numbers where the second argument is the first number in the list. The
function returns the ListElement that corresponds to the value of Arg1.
When Arg1 is less than or equal to 1, then ListElement1 is returned. When
Arg1 is greater than or equal to N, then ListElementN is returned.

Examples:
Index (X,10,20,30) returns 10 for X <= 1, 20 for X=2, and 30 for X >= 3

Impact on users: None for existing users unless they have used INDEX as a
Computed variable in existing keyword files. Those files will no longer
work.

Files:
base/src/algkey.f -- added INDEX as an Event Monitor token
base/src/algevl.f -- added code to compute the value of INDEX.
