next up previous
Next: Primary and Secondary Locators
Up: USING LOCATORS
Previous: Annulling Locators

Cloning Locators  

Since an HDS locator only refers to a data object and does not itself contain any data values, it is possible to have several locators referring to the same object. A duplicate locator for an HDS object may be derived from an existing one by a process called cloning, which is performed by the routine DAT_CLONE, as follows:

      CALL DAT_CLONE( LOC1, LOC2, STATUS )

This returns a second locator LOC2 which refers to the same data object as LOC1.

Cloning is not required frequently, but it can occasionally be useful in allowing an application to "hold on" to a data object when a locator is passed to a routine which may annul it; i.e. you simply pass the original locator and keep the cloned copy.



next up previous
Next: Primary and Secondary Locators
Up: USING LOCATORS
Previous: Annulling Locators

HDS Hierarchical Data System
Starlink User Note 92
R.F. Warren-Smith & M.D. Lawden
23rd February 1999
E-mail:rfws@star.rl.ac.uk

Copyright (C) 1999 Central Laboratory of the Research Councils