astSet$<$X$>$astSetX - Set an attribute value for an Object

Description:
This is a family of functions which set a specified attribute value for an ObjectObject using one of several different data types. The type is selected by replacing $<$X$>$ in the function name by C, D, F, I or L, to supply a value in const char$*$ (i.e. string), double, float, int, or long format, respectively.

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

Synopsis:
void astSet$<$X$>$( AstObject $*$this, const char $*$attrib, $<$X$>$type value )
Parameters:
this
Pointer to the Object.
attrib
Pointer to a null-terminated character string containing the name of the attribute whose value is to be set.
value
The value to be set for the attribute, in the data type corresponding to $<$X$>$ (or, in the case of astSetC, a pointer to a null-terminated character string containing this value).
Class Applicability:
Object
These functions apply to all Objects.
Examples:
astSetI( frame, "Preserve", 1 );

Sets the Preserve attribute value for Object "frame" to 1.
astSetC( plot, "Format(1)", "%.2g" );

Sets the Format(1) attribute value for Object "plot" to the character string "%.2g".
Notes:
  • Attribute names are not case sensitive and may be surrounded by white space.

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