|
HDSAn interface to the Starlink Hierarchical Data System (HDS) is provided in QCL. Hierarchical Data Elements (HDE) are referenced in QCL using the reserved prefix HDE_ (HDE underscore). Any symbolic name prefixed by HDE_ is assumed to be a data element in a HDS structure and not a normal QCL symbolic name. The HDS structure which contains the element is specified by assigning the symbolic name HDS_NODE. The node description can include both a container file name and a structured object name within the file. If both are present they must be separated by the % character. HDS_NODE is often just a file name but can be more complicated, for example qcl>HDS_NODE='datafile.sdf qcl>HDS_NODE='datafile.sdf%ORBITAL_ELMS Once the HDS_NODE has been specified by such an assignment, single elements of primitive objects contained in that node can be referenced by name. qcl>TMJD=HDE_BASEMJD qcl>PIXEL=HDE_IMAGE(3,200) The value of the scalar object BASEMJD will be assigned to the QCL name TMJD and the single cell of IMAGE will be assigned to PIXEL. Such assignments always produce a character string to represent the element value so TYPE conversion is implicit. HDE_ references can be used anywhere a normal QCL symbolic name would be allowed. For example in functions and on the left hand side of assignments. qcl>COSANGLE=COS(HDE_ANGLE) qcl>HDE_SAVEIT='Just a character string' When used on the left hand side of assignments the element must already exist within the structure (so that TYPE conversion is possible) and the effect of the assignment is to change the value of the element. Therefore you can very easily edit HDS files! When the object referred to by using the HDE_ prefix is dimensioned a single cell of the object must be named. QCL can only handle single cells and can't manipulate dimensioned objects or complete structures. [Top of page] [Next: Dot Commands] [Previous: Assignment to a Channel] [Back to Assignments and Expressions] |
|||||||||||||||||||||||||||||||||||
|
|