Search                        Top                                  Index
HELP COPYDATA                                      Roger Evans, Aug 1985

    copydata(struct1) -> struct2

copydata copies its argument, and recursively copies its components
(unlike copy which only copies the top level of a data structure). Thus
it returns a structure which is similar to its argument, but completely
separate from it.

Only vectors, records, arrays, properties, and Prolog variables are
copied; other items are returned unchanged.

There is a check for one-level circularity (an object being an element
of itself) but not for general circularity. There is no check for a list
being a member of itself, apart from being the head or the tail. When
circularity is detected a mishap results (except in the case of a
prologvar, which is replaced by a new one).

See also LIB * COPYDATA, HELP * COPY, and HELP * COPYLIST.


--- C.all/help/copydata
--- Copyright University of Sussex 1995. All rights reserved.