IBitArray.Item

Syntax

Item(Index: Integer): Boolean;

Parameters

Index. Index of the element, which value should be determined.

Description

The Item property determines value of the element with the specified index.

Example

Sub UserProc;
Var
    BitArr: IBitArray;
    i: Integer;
Begin
    BitArr := New BitArray.Create;
    For i := 0 To Math.RandBetweenI(50100Do
        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:

IBitArray