HMODIFY

Modify the value of an HDS object

Description:

Allows the value of an HDS primitive data object to be changed. The new value(s) may be entered directly at the terminal or may be taken from another HDS object. Information about the object is displayed.

Every effort is made to convert the value(s) to the required type, using HDS rules. Error DAT__CONER is reported if this is not possible.

For _CHAR values, the character length of the value object need not match that of the object to be updated. If the used length of any element of the given value exceeds that of the output object, it will be truncated and a warning message displayed, trailing spaces will be silently truncated.

Usage:

hmodify inp value

Parameters:

INP=UNIV (Read)
Name of object to be modified - must be primitive. <GLOBAL.HDSOBJ >
VAL=UNIV (Read)
Value to be given to object - this can be an explicit value (including an array) entered at at the terminal or the name of another object. The value must be of the same size and shape as the object to be modified but will be converted to the correct type if possible. Character values must be quoted.

Examples:

% hmodify spectrum.data.temp 20000
Writes the value 20000 into the specified component
% hmodify ds.axis(1).units"Counts/s"
Writes the value "Counts/s" into the UNITS component of first element of the AXIS array of structures in container file ds.sdf.
% hmodify ds.data_array(1:5)[1 2 3 4 5]
Writes the given values into the specified slice of component DATA_ARRAY in container file ds.sdf.
% hmodify ds.data_array ds2.data_array
Replace the values of the first DATA_ARRAY with those in the second. They must be the same size.