are used and returned
Each value has an associated type
that constrains how it may be used (these constraints are purely in the compiler and not part of LSL). To convert one value type into another, a typecast
is required. Typecasting a value may have irreversable effects to its value.
New values are created in scripts
using literal expressions
or by executing expressions containing operators
or value-returning function calls
. Values may be assigned
to (or stored in) variables
, retrieved from variables, used as operands in expressions
, and result from applying operators. Values are also passed into function calls as parameters
and returned from function calls.
Many, but not all, values can be represented with literal text
. In the following example, the literal text representation of 5
, and <1, 2, 3>
are all referred to as literal values.
integer x = 5;
string greeting = "Hello";
vector pos = <1, 2, 3>;
LSL has a limitation on the values that can be in a list
Those curious as to how literals are parsed can take a look at the lex file