Difference between revisions of "User:SignpostMarv Martin/Sandbox/LSL/types"

From Second Life Wiki
Jump to navigation Jump to search
(created test article to avoid red links)
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== list ==
== vector ==
== rotation ==
== String types ==
== String types ==
=== string ===
=== string ===
* LSL strings support [http://en.wikipedia.org/wiki/UTF-8 UTF-8 characters].
* LSL string variables are limited to the amount of free [[LSL#memory|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 ===
* Key is the data type used to store [[UUID]]
* Although Second Life UUIDs adhere to a [http://www.opengroup.org/onlinepubs/9629399/apdxa.htm specific standard], the key data type itself can store any valid string.


== Numeric types ==
== Numeric types ==
=== float ===
=== float ===
* LSL Floats adhere to the [http://steve.hollasch.net/cgindex/coding/ieeefloat.html IEEE 754] standard for floating point numbers.


=== integer ===
=== 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;
== vector ==
== rotation ==
== list ==
== See Also ==
* [[String]]
* [[UUID]]
* [[Hexadecimal]]
* [[Floats]]
* [[:Category:LSL Functions/String]]
* [[:Category:LSL Functions/Key]]
* [[:Category:LSL Library/String]]
* [[:Category:LSL Library/Key]]

Latest revision as of 12:51, 14 November 2007

String types

string

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

  1. integer foo = 10;
  2. integer bar = 0xa; // returns 10
  3. float bah = 10.0;
  1. integer foo = (integer)16.4; // returns 16
  2. float bar = 16.4;

vector

rotation

list

See Also