copy (Array)

Creates a new array with the elements being copies (not aliases) of the elements of an existing array.

Arguments

array0
is the array to copy from.

Return values

array1
is the new array.

Complexity

O(getSize)

Example

"sl/array" useFile a: (1 2 0 5 "Hello" 0.3) makeArray; b: a copy; 10 0 a ! a [print "," print TRUE] enum LF print b [print "," print TRUE] enum
Output:
10,2,0,5,Hello,0.300000, 1,2,0,5,Hello,0.300000,