Int Data Type

Holds signed integer values guarenteed to be at least 32 bits (4 bytes) and provides the best performance. On 32-bit platforms, values are in the range −2,147,483,648 – +2,147,483,647.

Instructions

Int is short for “integer”.

Default value
If you declare a variable of type Int and do not initialize it,, then its default value is zero (0).
Coercion
Int widens to Int64, Int128, Real32, Real64, Real, or Real128 without risk of overflow.
Type characters
If you add the character “%” to the end of a variable name, then the variable has the type Int.

Shared methods and properties

Int.Bits As Int
Returns the number of available bits. Typical values are 32 or 64.
Int.Default As Int
Returns the default value, 0.
Int.Max As Int
Returns the maximum positive value.
Int.Min As Int
Returns the minimum negative value.
Int.Parse(str As String, Optional #fmt As Format) As Int
Tries to parse a string that shows as an integer.
If #fmt is not given or is #Null, then it tries to parse str as a decimal (base-10) integer. Or you can be explicit with Format.#Base10.

Examples

Dim foo As Int
Dim bar%

See also