IBitArray.Clone

Syntax

Clone: IBitArray;

Description

The Clone method creates a copy of the array.

Example

Sub Main;

Var

BitArr, BitArr1: IBitArray;

i: Integer;

Begin

BitArr:=New BitArray.Create;

BitArr1:=New BitArray.Create;

For i:=0 To Math.RandBetweenI(50,100) Do

If Math.Round(Math.Rand,0)=1 Then

BitArr.Item(i):=True;

Else

BitArr.Item(i):=False;

End If;

End For;

BitArr1:=BitArr.Clone;

End Sub Main;

After executing the example the BitArr array contains a copy of the BitArr1 array.

See also:

IBitArray