RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBits.Bits Property

Provides indexed access to the array of Boolean values that the TBits object represents.

Pascal
property Bits [Index: Integer]: Boolean;
C++
__property Boolean Bits[int Index];

Use Bits to read or set a particular Boolean value, as indexed by the Index parameter. If Index is not in the range 0..Size - 1, an EBitsError exception is raised.

Note: In Delphi, Bits is the default property for TBits. This means that the property name can be omitted in code. That is, the statement
MyBitsObject.Bits[0]; 

Can be written 

MyBitsObject[0];

Note: In C++, Bits can be accessed using the [] operator, to achieve an effect similar to the default property in Delphi.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!