A 64-bit signed integer. Decimal and hexadecimal literals are supported, the latter with a 0x prefix.

For example:

set resp.status = 200;
set var.i = 0x5a5a;

The INTEGER type can represent one more value on the negative side than on the positive side. Being 64-bit, its range is −(263) to 263 − 1 inclusive. That is, the minimum and maximum values are -9223372036854775808 and 9223372036854775807 respectively, or -0x8000000000000000 and 0x7FFFFFFFFFFFFFFF in hexadecimal.

A leading - for negative numbers is considered part of the literal syntax, rather than as a separate unary operator. Therefore a literal may be given with the maximum negative value:

declare local var.min INTEGER;
declare local var.max INTEGER;
set var.min = -9223372036854775808;
set var.max = 9223372036854775807;
set var.min = -0x8000000000000000;
set var.max = 0x7FFFFFFFFFFFFFFF;

User contributed notes


Do you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact