next up previous 264
Next: AST_GETACTIVEUNIT - Determines how the Unit attribute will be used
Up: AST Routine Descriptions
Previous: AST_GENCURVE - Draw a generalized curve


AST_GET$<$X$>$ - Get an attribute value for an Object

Description:
This is a family of functions which return a specified attribute value for an Object using one of several different data types. The type is selected by replacing $<$X$>$ in the function name by C, D, I, L or R, to obtain a result in Character, Double precision, Integer, Logical or Real format, respectively.

If possible, the attribute value is converted to the type you request. If conversion is not possible, an error will result.

Invocation:
RESULT = AST_GET$<$X$>$( THIS, ATTRIB, STATUS )
Arguments:
THIS = INTEGER (Given)
Pointer to the Object.
ATTRIB = CHARACTER $*$ ( $*$ ) (Given)
A character string containing the name of the attribute whose value is required.
STATUS = INTEGER (Given and Returned)
The global status.
Class Applicability:
Object
These functions apply to all Objects.
Returned Value:
AST_GET$<$X$>$ = $<$X$>$type
The attribute value, in the data type corresponding to $<$X$>$.
Examples:
WRITE( $*$, '('' RefCount = '', A10 )' ) AST_GETC( Z, 'RefCount', STATUS )

Prints the RefCount attribute value for Object Z as a character string.
NAXES = AST_GETI( FRAME, 'Naxes', STATUS )

Obtains the value of the Naxes attribute for Object FRAME as an integer.
Notes:
  • Attribute names are not case sensitive and may be surrounded by white space.

  • An appropriate "null" value will be returned if this function is invoked with STATUS set to an error value, or if it should fail for any reason. This null value is zero for numeric values, .FALSE. for logical values, and blank for character values.

  • Numerical attribute values of zero translate to logical value .FALSE. and all other numerical values translate to .TRUE..


next up previous 264
Next: AST_GETACTIVEUNIT - Determines how the Unit attribute will be used
Up: AST Routine Descriptions
Previous: AST_GENCURVE - Draw a generalized curve

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