Int, Int32, Integer32, Long Data Type

Purpose

A 32 bit signed integral value.

Syntax

Dim name As Int | Int32 | Integer32 | Long
Dim name%

Description

Type declaration character is %.

Int, Int32, Integer32, and Long are keywords for a 32-bits signed integer.

Range: -2147483648 to 2147483647

Defined constants:

_maxInt = 2147483647

_minInt = -2147483648

Arithmetic operations are faster with integral types than with other data types. They are fastest with the 32-bit Integer types.

Example

Dim d As Int = 2

Local Long d1, d2%

Const DD = 1

Const DD_1 = _maxInt

Remarks

With calculations GFA-BASIC 32 does not perform overflow checking. Obviously, _maxInt + _maxInt is wrong when the result is stored in 32-bit integer.

See Also

Boolean, Byte, Card, Short, Word, Int16, Long, Int, Integer, Int32, Register Int, Int64, Large, Single, Double, Currency, Date, Handle, String, Variant, Object

{Created by Sjouke Hamstra; Last updated: 10/10/2014 by James Gaite}