Integer Data Type

See Also1M7GSR1

Integer variables are stored as 16-bit numbers (2 bytes) ranging in value from -32,768 to 32,767.  The type-declaration character4TVC9NP for an Integer is % (ANSI5221FB character 37).

In addition to representing numbers in this range, Integers can represent Boolean62VG080 values (values that can have only one of two states).  For Boolean values, -1 represents true and 0 represents false.  You can also use the Visual Basic reserved words43US84 True and False, which return -1 and 0, respectively.

You can also use Integers to represent enumerated values.  An enumerated value can contain a finite set of unique whole numbers, each of which has special meaning in the context in which it is used.  Enumerated values provide a convenient way to select among a known number of choices.

See Also

Long Data Type103F6YL

Visual Basic Data Types2M0APUD