REBOL Document

Copy - Function Summary


Summary:

Returns a copy of a value.

Usage:

copy value

Arguments:

value - Usually a series (must be: series port bitset)

Refinements:

/part - Limits to a given length or position.

range - The range argument. (must be: number series port pair)

/deep - Also copies series values within the block.

Description:

Be sure to use COPY on any string or block literal values in your code if you expect to modify them.

For series, the /PART refinement will copy a given number of values (specified as either a count or as an ending series position).


    str: copy "with all things considered"
    print str
    with all things considered


    strings: copy ["how" "flies"]
    print strings
    how flies


    insert next strings "time"
    print strings
    how time flies

Related:

change - Changes a value in a series and returns the series after the change.
clear - Removes all values from the current index to the tail. Returns at tail.
insert - Inserts a value into a series and returns the series after the insert.
make - Constructs and returns a new value.
remove - Removes value(s) from a series and returns after the remove.


<Back | Index | Next>

Copyright 2004 REBOL Technologies