Processing math: 100%

HFILL

Fill an HDS data object with a specified value

Description:

This application allows primitive data object of any shape and size to be filled with a single specified value.

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

The defined object may be a slice of a larger array. If the array was previously undefined, it becomes defined - other elements are initialised to zero (or blank for type _CHAR).

Usage:

% hfill inp value

Parameters:

INP = UNIV (Read)
Name of object. <GLOBAL.HDSOBJ>
VALUE = UNIV (Read)
The value to be used.

Examples:

% hfill cfile.real 0
Puts the value 0.0 into every element of component REAL of container file cfile.sdf.
% hfill cfile.real(2,1:) 5.5
Puts value 5.5 in each element of the specified slice of OBJECT (assuming the slice specification is valid for OBJECT).
% hfill cfile.real "a"
Fails as the value a cannot be converted to _REAL.
% hfill cfile.chars ""
Writes a blank string into every element of component CHARS of container file cont.sdf

Deficiencies

There is a limit of 80 characters on the size of a character value which may be given. A value larger than this will cause a DAT__TRUNC error. A smaller value too large to fit in the specified objects elements will be silently truncated.