Linden Scripting Language Guide - Engineering Center
Linden Scripting Language Guide - Engineering Center
Linden Scripting Language Guide - Engineering Center
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 3. Basicsstring StringVar = "Hello, Carbon Unit";list MyList = [ 1234, ZERO_ROTATION, StringVar ];Yields the list: [ 1234, , "Hello, Carbon Unit" ]Lists can be combined with other lists. For example:MyList = 3.14159 + MyList;Yields the list: [ 3.14159, 1234, , "Hello, Carbon Unit" ] And similarly,MyList = MyList + MyList;Yields: [ 3.14159, 1234, , "Hello, Carbon Unit", 3.14159, 1234,, "Hello, Carbon Unit" ]Library functions exist used to copy data from lists, sort lists, copy/remove sublists.3.3.1. Type ConversionType conversion can either occur implicitly or explicitly. Explicit type casts are accomplished using C syntax:float foo_float = 1.0;integer foo_int = (integer)foo_float;3.3.1.1. Implicit CastingLSL only supports two implicit type casts: integer to float and string to key. Thus, any place you see a floatspecified you can supply an integer, and any place you see a key specified, you can supply a string.3.3.1.2. Explicit CastingLSL supports the following explicit casts:• Integer to String• Float to Integer• Float to String• Vector to String• Rotation to String9