Contents Up << >>

Types

In this section we discuss many different built-in types of objects that can be used, as well as how to declare new types. The built-in types are boolean, bit, character, severity_level, integer, real, time, string and bit_vector. Types that represent a subset of values represented by another type are called subtypes. There are two built-in subtypes, natural and positive.

The integer and real types represent the obvious. An integer object may have any integer value from -2147483648 to 2147483647. An object of the real type can represent values with up to 15 digits of precision. After discussing how to declare new types, the remaining built-in types can be described by specifying how they would be declared as new types.

The type and subtype definitions follow the rules: The access, file and incomplete type definitions are discussed in the next chapter. The other kinds of types are described in the following sub-sections.

Enumeration types
Real and Integer types
Physical types
Array types
Record types