Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ACOPY, bug or am I missing something
Message
From
18/04/2002 07:04:04
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
18/04/2002 06:44:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00646234
Message ID:
00646238
Views:
17
>Hi
>
>OK, I have a property (which is an array) in my object which I ACOPY into a local array, I thought that ACOPY increases the elements in a destination array to match the source array, this works fine the first time, but when I want copy another property (array) into the same local array, it errors.
>
>Sample code:
>
LOCAL laOutput(1, 1)
>
>*Copy first array (this works fine)
>=ACOPY(this.aArray1, laOutput)
>
>*Copy second array (this errors)
>=ACOPY(this.aArray2, laOutput)
>
>
>
>this.aArray1 is [6, 9] and this.aArray2 is [7, 9].
>
>Any ideas?
>
>Thanks
>Kev

Hi Kevin,
acording to Help dimension of DestinationArray is changed on if DestArray not exists.
But this is not very clear.
ACOPY is a little bit tricky because it seems to work like
FOR lnloop = 1 TO ALEN(SourceArray)
 DestArray(lnloop)=SourceArray(lnloop)
ENDFOR
so you better do
DIMENSION laOutput(ALEN(this.aArray2,1),ALEN(this.aArray2,2))
=ACOPY(this.aArray2, laOutput)
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform