Gambas Documentation - /cat/integer

/cat/integer

# Integer

An integer is a whole number, a Number that does not contain a decimal point. An integer consists of an optional sign, one or more digits.

[ `sign` ] { `digit` [ `digit` [ ... ] ] }

- `sign` : `+` or `-`, if the sign is missing, it is presumed to be `+`.

- `digit` : `0` through `9`.

Gambas provides four different integer types:

Integers | Description | Default value | Size in memory
--- | --- | --- | ---
`Byte` | 0...255 | `0` | 1 byte
`Short` | -32.768...+32.767 | `0` | 2 bytes
`Integer` | -2.147.483.648...+2.147.483.647 | `0` | 4 bytes
`Long` | -9.223.372.036.854.775.808...+9.223.372.036.854.775.807 | `0` | 8 bytes

}

### See also

- Floating Point Numbers

- Number