AST_MAPKEY

Get the key at a given index within the KeyMap

Description:

This function returns a string holding the key for the entry with the given index within the KeyMap.

This function is intended primarily as a means of iterating round all the elements in a KeyMap. For this purpose, the number of entries in the KeyMap should first be found using AST_MAPSIZE and this function should then be called in a loop, with the index value going from one to the size of the KeyMap. The index associated with a given entry is determined by the SortBy attribute.

Invocation

RESULT = AST_MAPKEY( THIS, INDEX, STATUS )

Arguments

THIS = INTEGER (Given)
Pointer to the KeyMap.
INDEX = INTEGER (Given)
The index into the KeyMap. The first entry has index one, and the last has index SIZE, the value returned by the AST_MAPSIZE function.
STATUS = INTEGER (Given and Returned)
The global status.

Returned Value

AST_MAPKEY = CHARACTER ( AST__SZCHR )
The key value.

Notes: