Item(Index: Integer): Boolean;
Index is an index of the element, which value should be determined.
The Item property determines value of the array element, which index is passed by the Index parameter.
Sub Main;
Var
BitArr: IBitArray;
i: Integer;
Begin
BitArr:=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;
End Sub Main;
After executing the example a dynamic bit array is generated.
See also: