copy Full Description |
|
Syntaxcopy shelf-type? shelf-name to shelf-name Purpose Used to copy the entire contents of one shelf to another. This action replaces the contents of the destination shelf with the contents of the source shelf. The shelf type is an optional herald that can be omitted. The first shelf name refers to the shelf being copied; the second refers to the destination shelf. Both the source and destination shelves must be of the same type (switch, counter or stream). Because the destination shelf will become the same size as the source shelf, it must have either a declared size of When stream shelves are copied, all streams on the source shelf must be either closed and attached to buffers or unattached. All open streams on the destination shelf will automatically be closed before the This code fragment illustrates how This example copies all the items of the counter 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 "reference-counts" has the same value and key as its corresponding item in "saved-reference-counts".
global counter reference-counts process local counter saved-reference-counts copy reference-counts to saved-reference-counts |