oBit Object
An Object that maintains a 1-bit variable.
Description:

A Variable Object whose Value property consists of 1 bit.
 

Operation:

An oBit Object variable stores a 1 bit value in its Value property and maintains other values that represent the status of that 1 bit. A NonZero property indicates if the value of the 1 bit is not zero.
 

Remarks:

An oBit Object uses only one byte of storage space. Therefore, it is one of the fastest & most efficient numeric variables.

Since the Value property of the oBit Object is also a Flag property, A Virtual Circuit connection may be made to the Value property by either an Object pointer or a Flag pointer.
 

Size:

1 Byte
 

Properties:

The following table lists the Properties of the oBit Object:
PropertyDescription
Address

Returns a pointer to the address of the oBit Object instance.

Data-Type: Number-Pointer, Read-Only

Data-Range: 0 - 127

NonZero

Set to 1 when the Value property is not zero and cleared to 0 when the Value property is zero.

Data-Type: Bit, Flag

Data-Range: 0 - 1

The following table list the values of the NonZero Property:
NonZeroConstantDescription
0cvFalse

The Value property is zero.

1cvTrue

The Value property is not zero.

String

The Value property represented as a string.

Note: The String property is available in OOPic Basic Version 2

Data-Type: String, Flag

Value

The value of the 1 bit.

Data-Type: Bit, Flag, Default

Data-Range: 0 - 1


 

Methods:

The following table lists the Methods of the oBit Object:
MethodsDescription
Clear

Clears the Value property to 0.

Invert

Toggles the bit in the Value property

Set

Sets the Value property to 1.