IBitArray.Item

Syntax

Item(Index: Integer): Boolean;

Parameters

Index is an index of the element, which value should be determined.

Description

The Item property determines value of the array element, which index is passed by the Index parameter.

Example

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:

IBitArray