LET – array copy
Array Copy
This directive is used to make a duplicate copy of a string array or numeric array.
Syntax
Section titled “Syntax”[LET] receive-array[ALL] = send-array[ALL]LET- is optional syntax that appears in the program listing.
receive-array- is the name of the new array to be created.
send-array- is the name of the array to be duplicated.
[ALL]- specifies that all elements of receive-array and send-array are affected.
Remarks
Section titled “Remarks”If receive-array exists when this directive is executed it is first deleted.
A new receive-array is created using the dimensions of send-array. All elements of send-array are then copied to receive-array.
Receive-array and send-array must be the same type. Only string and numeric arrays can be duplicated.
An error 33 will result if there is insufficient available memory to create the new array. In this case, receive-array will have been deleted if it existed.
Examples
Section titled “Examples”LET RCVARRAY$[ALL] = SNDARRAY$[ALL]all elements of SNDARRAY are copied to RCVARRAY creating a duplicate array.
LET RCVARRAY[ALL] = SNDARRAY[ALL]has the same effect as the first example for a numeric array.
LET RCVARRAY$[ALL] = SNDARRAY[ALL]this is a syntax error.
From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF