[Gambas-user] Array question

Benoit Minisini gambas at ...1...
Tue Oct 12 14:31:14 CEST 2004


On Tuesday 12 October 2004 14:07, ron wrote:
> Sorry if I'm wrong but look to this mesage.
>
>
>
> Re: [Gambas-user] Methods Copy.
>
> From: Benoit Minisini <gambas at ...1...>
> To: gambas-user at lists.sourceforge.net
> Date: 2004-07-22 23:52
>
> On Thursday 22 July 2004 23:07, Leo Barnhoorn wrote:
> > Hello Benoit,
> >
> > Can you tell me how the methode copy works of the Byte[] array.
> >
> > Thanks.
> >
> > Regards,
> > Leo.
>
> DIM hOld AS Byte[]
> DIM hNew AS Byte[]
>
> hOld[0] = 1
> hNew = hOld.Copy()
> hNew[0] = 2
> PRINT hOld[0]
>
> This returns 2. If you don't make a copy, this will return 1.
>
> Regards,

Sorry! I made a mistake in this message - I wanted to write "PRINT hNew[0]" 
and not "PRINT hOld[0]".

But think logical: what could be the use of the Copy() method on an array 
object if it does not make a deep copy of the object ?

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list