Duplicates a pointer, with all its components (R.W. Payne).
||Pointers to duplicate|
PDUPLICATE is useful when you want to duplicate the complete tree of data structures to which a pointer points. So, it duplicates not only the pointer itself, but all the structures to which it points. Also, if any of these structures is itself a pointer, the structures to which that too points will be duplicated.
The pointer to be duplicated is specified by the
OLDPOINTER parameter, and the duplicated pointer is saved by the
PDUPLICATE calls itself recursively to duplicate any pointers inside
OLDPOINTER. The individual data structures are duplicated by the
CAPTION 'PDUPLICATE example'; STYLE=meta SCALAR S1,S2,S3; VALUE=1,2,3 POINTER [VALUES=S1,S2] P2 & [VALUES=P2,S3] P1 PRINT #P1 PDUPLICATE P1; NEWPOINTER=D1 PRINT #D1