Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy Array Elements
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01249163
Message ID:
01249167
Views:
17
>I want to add one array to another. When I use ACOPY(), the destination array is overwritten, instead of appended to.
>
>Is there a way to do this without iterating through the array?

ACOPY() has 5 parameters:
CLEAR
DECLARE laTest[7]
DECLARE laTest1[8]
FOR asd = 1 to 7
    laTest[asd] = REPLICATE([A],asd)
NEXT

FOR asd = 1 to 8
    laTest1[asd] = REPLICATE([B],asd)
NEXT
lnNextElementToCopy = ALEN(laTest1,1)+1
DECLARE laTest1[ALEN(laTest1,1)+ALEN(laTest,1)]
=ACOPY(laTest,laTest1,1,-1,lnNextElementToCopy)
DISP MEMO LIKE laTest1
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform