User:SignpostMarv Martin/Sandbox/LSL/types
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
String types
string
- LSL strings support UTF-8 characters.
- LSL string variables are limited to the amount of free memory available to the script.
- Other data types can be typecast into a string for use with llHTTPRequest(), llMessageLinked etc.
- The results of any communication operation that returns a string (listen, link_message, http_response, dataserver) can be typecast into the required data type.
key
- Key is the data type used to store UUID
- Although Second Life UUIDs adhere to a specific standard, the key data type itself can store any valid string.
Numeric types
float
- LSL Floats adhere to the IEEE 754 standard for floating point numbers.
integer
- In LSL, integers are 32-bit values ranging from -2147483648 to 2147483647.
- LSL does not have an unsigned integer type (which would allow for values between 0 and 4294967295)
- Integers can either be entered in decimal or hexadecimal
Examples
- integer foo = 10;
- integer bar = 0xa; // returns 10
- float bah = 10.0;
- integer foo = (integer)16.4; // returns 16
- float bar = 16.4;