LSL Portal

Integer

• Example:
• 1 + 1
• Result = 2
Note: If one variable or value is a float, the integer value will be cast to a float automatically.

Float

• Example:
• 1.5 + 1.5
• Result = 3.0
Note: If one variable or value is an integer, the integer value will be cast to a float automatically.

Vector

• Examples:
• <1.0, 1.0, 1.0> + <1.0, 0.0, -1.0>
• Result = <2.0, 1.0, 0.0>
• Action: <a.x, a.y, a.z> + <b.x, b.y, b.z> == <a.x + b.x, a.y + b.y, a.z + b.z>
• <-1.0, 0.0, 1.0> + 1.0
• Result: <0.0, 1.0, 2.0>
• Action: <a.x, a.y, a.z> + b == <a.x + b, a.y + b, a.z + b>
Note: All elements are floats, if any are written as integers they will be cast to floats automatically

Rotation

• Operation: unknown!
Note: This operator is rarely used with this type as it is not a meaningful way of combining quaternions being used to represent rotations. Use Multiplication instead.

String

• Operation: Concatenation (adds to the end of)
• Example:
• "abc" + "def"
• Result = "abcdef"
Note: While Keys are a specialized type of String They cannot be directly used with this operator.

List

• Operation: Concatenation (adds to the end of)
• Example:
• [0, 0.0, <0.0, 0.0, 0.0>, ""] + [1, 1.0, <1.0, 1.0, 1.0>, "xyz"]
• Result: [0, 0.0, <0.0, 0.0, 0.0>, "", 1, 1.0, <1.0, 1.0, 1.0>, "xyz"]
• list + value = [contents_of_list, value]
Note: If the type of the variable or value being added to a list is not a list it will be cast to a list automatically