next up previous 264
Next: AST_SETX - Set an attribute value for an Object
Up: AST Routine Descriptions
Previous: AST_SELECTORMAP - Create a SelectorMap


AST_SET - Set attribute values for an Object

Description:
This routine assigns a set of attribute values to an Object, over-riding any previous values. The attributes and their new values are specified via a character string, which should contain a comma-separated list of the form:

"attribute_1 = value_1, attribute_2 = value_2, ... "

where "attribute_n" specifies an attribute name, and the value to the right of each "=" sign should be a suitable textual representation of the value to be assigned. This value will be interpreted according to the attribute's data type.

Invocation:
CALL AST_SET( THIS, SETTINGS, STATUS )
Arguments:
THIS = INTEGER (Given)
Pointer to the Object.
SETTINGS = CHARACTER $*$ ( $*$ ) (Given)
A character string containing a comma-separated list of attribute settings in the form described above.
STATUS = INTEGER (Given and Returned)
The global status.
Class Applicability:
Object
This routine applies to all Objects.
Examples:
CALL AST_SET( MAP, 'Report = 1, Zoom = 25.0', STATUS )

Sets the Report attribute for Object MAP to the value 1 and the Zoom attribute to 25.0.
CALL AST_SET( FRAME, 'Label( 1 ) =Offset from cluster axis', STATUS )

Sets the Label(1) attribute for Object FRAME to a suitable string.
Notes:
  • Attribute names are not case sensitive and may be surrounded by white space.

  • White space may also surround attribute values, where it will generally be ignored (except for string-valued attributes where it is significant and forms part of the value to be assigned).

  • To include a literal comma in the value assigned to an attribute, the whole attribute value should be enclosed in quotation markes.

  • An error will result if an attempt is made to set a value for a read-only attribute.


next up previous 264
Next: AST_SETX - Set an attribute value for an Object
Up: AST Routine Descriptions
Previous: AST_SELECTORMAP - Create a SelectorMap

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