|
Creating a New ObjectA new structure or primitive object is created using the command qcl>CREATE HDF_OPSEC,HDF_INIT The specification of the new object is given in the parameter HDF_OSPEC including the container file name, object name, object dimensions and the HDS data type. If the file name is omitted then the default node is assumed. The dimensions must be enclosed in parentheses () and the type in angle brackets <>. If the dimensions are omitted then a scalar is created and if the data type is omitted then <structure> is assumed. Note that the syntax used to specify the dimensions must not be confused with the specification of a single object cell which is the more usual use of integer subscripts enclosed in parentheses. (This possible confusion is similar to the difference between the declaration of a dimensioned variable and the use of elements of that variable in FORTRAN 77.) The second parameter HDF_INIT specifies an initial value for scalars. This is ignored if the object created is an array. qcl>HDS_NODE='joke.dat%data.image' qcl>CREATE 'real_array(3,5)<_real>' These commands will create a real array with full specification joke.dat%data.image.real_array(3,5)<_real>at the default node. If the specification is prefixed by <filename>% then the new object will be created within the specified structure object of the appropriate file. qcl>CREATE 'data.sdf%save.ipix<_integer>',33 This command will create the integer scalar with full name data.sdf%save.ipix and value 33. Note that in the above examples data, image and save are all structure objects within the container files. [Next: Directory Listing] [Previous: New container files] [Back to Command Descriptions] |
|||||||||||||||||||||||||||||||||||
|
|