LONG

64-bit two’s complement integer. The signed long has a minimum value of -2^63 and a maximum value of 2^63-1

LITERAL NOTATION: LONG can be expressed in decimal or hexadecimal notation and followed by the ‘l’ or ‘L’ letter:

decimal: -9223372036854775807l to 223372036854775806l
hexadecimal: 0x0L to 0xFFFFFFFFFFFFFFFFl

Conversion

1
2
3
LONG("83457264009472472")   // => 83457264009472472l
LONG(30)                    // => 30l
LONG(25.34)                 // => 25
  1. converts the numerical value in a string to LONG
  2. converts an INTEGER to LONG
  3. converts a FLOAT or DOUBLE value to LONG

Expressions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
2l > 1l          // => TRUE
2l < 1l          // => FALSE
2l = 2l          // => TRUE
2l >= 1l         // => FALSE
2l <= 3l         // => TRUE
2l + 1l          // => 3l
1l - 1l          // => 0l
2l * 2l          // => 4l
2l / 2l          // => 1l
5l % 2l          // => 1l
1l & 0l          // => 0l
1l | 0l          // => 1l
1l ^ 1l          // => 0l
1l << 1l         // => 2l
1l >> 1l         // => 0l
1l >>> 1l        // => 0l
~ 1l            // => -2l
BIT_COUNT(1l)   // => 1

Parsing

1
2
LONG:fieldname
HEXLONG:fieldname

See also

LONG, HEXLONG