System.Classes.TBits

From Appmethod Libraries
Jump to: navigation, search

System.TObjectTBits

Object Pascal

TBits = class

C++

class PASCALIMPLEMENTATION TBits : public System::TObject

Properties

Type Visibility Source Unit Parent
class public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

TBits stores an array of Boolean values.

Use TBits to store and access an indefinite number of Boolean values. TBits can store as many Boolean values as can fit in the Index and available memory, both of which automatically expand storage space as needed. If the number of Boolean values is limited to 32, the same functionality can be achieved using a 32-bit integer with the following operators:

  • Bitwise AND (Object Pascal) or & (C++)
  • OR (Object Pascal) or | (C++)

An EBitsError exception is raised when trying to read an Index higher than Size-1. Writing an Index higher than Size-1 only extends the storage space.


See Also

Code Examples