Integer

LRM §3.1.2.

The integer type is a scalar whose set of values includes integer numbers of the specified range.

Syntax:

type type_name is integer_left_bound to integer_right_bound; 
type type_name is integer_left_bound downto integer_right_bound; 

Description:

An integer type is a numeric type which consists of integer numbers within the specified range. There is only one predefined Integer type, and that is type Integer which range depends on the implementation, but must cover at least the range +/-(2E31 - 1).

A user-defined integer type can be constructed on the basis of the predefined Integer type by constraining its range.

All integer types (including user-defined) have the same set of arithmetic operators, defined in the package Standard, namely: addition, subtraction, multiplication, division, modulus, and remainder. In all cases both operands and the result are of the integer type.

Relations can be checked on integer operands: equal, unequal, greater than, less than, greater or equal than, and less or equal than. In all cases, the result is of the Boolean type.

Example:

type Level is range 0 to 7; 
type Int_64K is range -65536 to 65535; 
type WORDS is range 31 downto 0;

Note:

See also:

Floating, Range, Standard Package, Subtype, Type