Share via


Integer Type ("M" Reference)

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

The Integer type encompasses all signed integer values.

Operators

The unary operations in the following table take Integer as a right operand.

Operator Return

+, -

Integer

The binary operations in the following table take Integer as a left operand.

Operator Right Operand Return

+, -

Integer

Integer

*, /, %

Integer

Integer

>, <, <=, >=, ==, !=

Integer

Logical

The arithmetic operations (+, -, *, /, %) are specialized to return the most specific type of its operands. For example, Integer8 + Integer8 returns Integer8, while Integer8 + Integer64 returns Integer64).

Remarks

The following operations may cause underflow and overflow errors:

  • The predefined unary - operator.

  • The predefined +, -, *, and / binary operators.

  • Explicit numeric conversions from one Number type to another.

If all of the operands are constant expressions, underflow and overflow is a compile error; otherwise, underflow and overflow is a run-time error.

The following operations may cause a divide by zero error:

  • The predefined / and % binary operators.

If the second operand (the denominator) is a constant expression, divide by zero is a compile error; otherwise, divide by zero is a run-time error.

Integer is an abstract type with the following four concrete subtypes:

  • Integer8

  • Integer16

  • Integer32

  • Integer64

Code Example

The following code shows the Millimeters field being declared as an Integer type and receiving the value of 43.

Millimeters : Integer = 43;