A B C D E F G I J K L M N O R S T U V W
If In

An integer is a signed, 32-bit value with valid range from -2147483648 to 2147483647 (that is 0x80000000 to 0x7FFFFFFF in hex). LSL does not have an unsigned integer type.

Examples:

10
122
-59438
0x5465

An integer is a whole number (no decimals). If you want decimals, you want a float.

As of Second Life 1.5, integers can be entered in hexadecimal (e.g. 0xff, 0x10, 0xF0AB, 0x20baef49 etc…) Strings typecast to integers also take these formats into account.

Example:

integer dec = 42; // 42 decimal
integer hex = 0xff; // 255 decimal

 

Octal support was added in 1.5.0 and removed in 1.5.2 because it caused incompatibilities with some existing scripts. The Lindens have not mentioned any plans to bring it back.

To round a float to an integer, use llRound.

Beware, a integer variable assigned a value larger/smaller than the valid range is instead assigned a value of -1.

// Watch out! This will compile, but will result in x having the value of -1.
integer x = 12345678900000;

 

Credit to: Lslwiki.net (not working) with changes made for brevity and clarity.