by Brayla Sana | Jan 23, 2017 | LSL, OSSL, Types, Wiki
Float A float is an IEEE-754 32-bit floating point value ranging from ±1.401298464E-45 to ±3.402823466E+38. Examples: 9.9 10.0 100000.1 LSL floats can be specified in scientific notation, e.g. 1.123E-2 or 512E+3. Additionally, the letter f...
by Brayla Sana | Apr 19, 2016 | Flow Control, LSL, OSSL, Wiki
Flow control statements control when and where code is executed (how it flows). The following keywords are parts of LSL flow control. Keyword Purpose if-else Execute some statements if a condition is true, other statements otherwise. while Execute some statements as...
by Brayla Sana | Apr 19, 2016 | Flow Control, LSL, OSSL, Wiki
The for loop is used to execute statements while a condition is true, and executes a line of code after each iteration/cycle/step. More commonly, it executes code a certain number of times, and operates a counter to facilitate it. Format: for (initialization; test;...
by Brayla Sana | Jan 16, 2017 | Functions, LSL, OSSL, Wiki
Functions Defined A function can be thought of as a machine into which input is provided, and which returns output. By using functions, the same blocks of code can be used over and over again, simply by referencing them. LSL and OSSL come with hundreds of built-in...
by Brayla Sana | Apr 19, 2016 | Flow Control, LSL, OSSL, Wiki
Execute some statement(s) if a condition is true, else some other statement(s) if it is false. This is essentially the “bread and butter” of coding: the decision making inside a script. if (condition) statement else statement if (condition) {...
by Brayla Sana | Jan 23, 2017 | LSL, OSSL, Types, Wiki
An integer is a signed, 32-bit value with valid range from -2147483648 to 2147483647 (that is 0x80000000 to 0x7FFFFFFF in hex). LSL does not have an unsigned integer type. Examples: 10 122 -59438 0x5465 An integer is a whole number (no decimals). If you want decimals,...