next up previous 264
Next: astColumnNull - Get or set the null value for an integer column of a FITS table
Up: AST Function Descriptions
Previous: astCmpRegion - Create a CmpRegion


astColumnName - Get the name of the column at a given index within the Table

Description:
This function returns a string holding the name of the column with the given index within the Table.

This function is intended primarily as a means of iterating round all the columns in a Table. For this purpose, the number of columns in the Table is given by the Ncolumn attribute of the Table. This function could then be called in a loop, with the index value going from zero to one less than Ncolumn.

Note, the index associated with a column decreases monotonically with the age of the column: the oldest Column in the Table will have index one, and the Column added most recently to the Table will have the largest index.

Synopsis:
const char $*$astColumnName( AstTable $*$this, int index )
Parameters:
this
Pointer to the Table.
index
The index into the list of columns. The first column has index one, and the last has index "Ncolumn".
Returned Value:
astColumnName()
A pointer to a null-terminated string containing the upper case column name.
Notes:
  • The returned pointer is guaranteed to remain valid and the string to which it points will not be over-written for a total of 50 successive invocations of this function. After this, the memory containing the string may be re-used, so a copy of the string should be made if it is needed for longer than this.

  • A NULL pointer will be returned if this function is invoked with the AST error status set, or if it should fail for any reason.


next up previous 264
Next: astColumnNull - Get or set the null value for an integer column of a FITS table
Up: AST Function Descriptions
Previous: astCmpRegion - Create a CmpRegion

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

Copyright (C) 2009 Science \& Technology Facilities Council