Boolean

 

Boolean Overview

Analytic supports Boolean Native data type. The Boolean type can contain one of two constants: true and false. The values true and false are reserved, and therefore cannot be used in any other context.

When to Use

The Boolean Native data type is suitable for situations in which can only have two values. Example situations may include a state: ?on? or ?off? . The state values must be mapped to the Boolean values such as on = true, off = false. Another example is a situation that may have two state values: yes, no. Again, the state values must be mapped to the Boolean values such as yes = true, no = false.

Constant Form

The Boolean Native data type is a container that may hold one of two constants: true and false.

Native Data Type

The Boolean Data Type is an example of an AIS Native Data Type.

Analytic Information Server stores all of its Native Data Types in Virtual Machine Containers. All containers are stored in memory. Containers provide the basic storage mechanism for modeling data of all types. Containers provide these fundamental characteristics:

Ability to hold any type of data (including code) at any time.

Ability to know what type of data is contained.

Ability to be stored, retrieved and evaluated by the system.

Ability to handle type conversion, and memory management automatically.

Containers come in two sizes, Large and Small. Small containers are six bytes in length, and large containers are ten bytes in length. Large containers can store larger amounts of data immediately and place less of a burden on the Heap manager. Small containers require less immediate space, but place more of a burden on the Heap manager.

Large containers can store the following data types immediately and does not require the services of the Heap manager:

Small containers can store the following data types immediately without placing additional burden on the Heap manager:

Analytic Information Server containers can be saved and loaded to and from persistent (database) storage at any time. Containers with immediate data are saved on disk in fixed length records equal to the size of the container. Containers with Heap object references are saved in fixed length records, which are automatically expanded to include the contents of the Heap object, and any objects referenced by the Heap object, etc. This feature is called Object Closure Management and is automatic with every Analytic Information Server container database save. Analytic Information Server containers may be loaded from any database repository record at any time. If the data in the record is immediate, the database load fills the container with the immediate data. If the data in the record is an object closure, the database load fills the container with a Heap object reference, and all of the objects in the record are loaded back into the Heap with the same referential relationships they had when they were saved.

 

Data Type Examples

The Boolean object can be demonstrated by the following examples.

Example_Boolean_addMethod_011 Example_Boolean_addMethod_012 Example_Boolean_bcompareEQ_001 Example_Boolean_bcompareGE_001
Example_Boolean_bcompareGT_001 Example_Boolean_bcompareLE_001 Example_Boolean_bcompareLT_001 Example_Boolean_bcompareNE_001
Example_Boolean_boolean_001 Example_Boolean_compareEQ_009 Example_Boolean_compareGE_009 Example_Boolean_compareGT_001
Example_Boolean_compareLE_001 Example_Boolean_compareLT_001 Example_Boolean_compareNE_009 Example_Boolean_compare_009
Example_Boolean_comparison_009 Example_Boolean_defmethod_012 Example_Boolean_isBoolean_001 Example_Boolean_isEqual_007
Example_Boolean_isIdentical_007 Example_Boolean_isType_011 Example_Boolean_methodsOf_012 Example_Boolean_ref_018
Example_Boolean_send_010 Example_Boolean_setq_016 Example_Boolean_sizeof_009 Example_Boolean_type_011