next up previous 264
Next: AST_MAPLENC - Get the number of characters in a character entry in a KeyMap
Up: AST Routine Descriptions
Previous: AST_MAPHASKEY - Check if an entry with a given key exists in a KeyMap


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:
  • A blank string will be returned if this function is invoked with STATUS set to an error value, or if it should fail for any reason.


next up previous 264
Next: AST_MAPLENC - Get the number of characters in a character entry in a KeyMap
Up: AST Routine Descriptions
Previous: AST_MAPHASKEY - Check if an entry with a given key exists in a KeyMap

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
24th May 2011
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2009 Science \& Technology Facilities Council