Item(Index: Integer): Boolean;
Index. Index of the element, which value should be determined.
The Item property determines value of the element with the specified index.
Sub UserProc;
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 UserProc;
After executing the example a dynamic bit array is generated.
See also: