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.
AST A Library for Handling World Coordinate Systems in Astronomy