copy source to destinationor
copy-clear source to destination
You can use
copy to copy the entire contents of one shelf to another. The contents of
destination are removed and replaced with a copy of the contents of source.
You can use
copy-clear to copy the entire contents of one shelf to another. The contents of
source are moved to destination, thereby leaving source empty.
Because destination will become the same size as source, it must be
variable size or the same size as source. If destination was declared
variable with a maximum size, the maximum size must be equal to or greater than the current size of
copy-clear, source must be of
variable size, since fixed-sized shelves
cannot be cleared.
stream shelves are copied using
streams on source must
closed. When you
streams on source may be
opened and will remain
opened on destination.
streams on destination will automatically be
copy action takes place.
This example copies all the items of the
integer shelf reference-counts to
saved-reference-counts. After the
copy, saved-reference-counts has the same number of
items as reference-counts, and each item in saved-reference-counts has the same value and key
as its corresponding item in reference-counts.
global integer reference-counts process local integer saved-reference-counts copy reference-counts to saved-reference-counts
copy does not copy the values of a shelf of
records but the references to these
records. After the
copy both shelves reference the same set of records.