From the NannyMUD documentation
2000-12-16
NAME
operators - Operators available in LPC.DESCRIPTION
These are the operators availailable in LPC. They are listed in the order or precedence (low priority first): expr1 , expr2 Evaluate 'expr1' and then 'expr2'. The returned value is the result of 'expr2'. The returned value of 'expr1' is thrown away. var = expr Evaluate 'expr', and assign the value to 'var'. The new value of 'var' is the result. var += expr Assign the value of 'expr' + 'var' to 'var'. This is equivalente to "var = var + expr". var -= expr Similar to '+=' above. var &= expr var |= expr var ^= expr var <<= expr var >>= expr var *= expr var %= expr var /= expr ex1 ? ex2 : ex3 This is the ternary operator. The construct can be considered a short form of 'if (ex1) ex2; else ex3;'. expr1 || expr2 The result is true if 'expr1' or 'expr2' is true. 'expr2' is not evaluated if 'expr1' was true. expr1 && expr2 The result is true i 'expr1' and 'expr2' is true. 'expr2' is not evaluated if 'expr1' was false. expr1 | expr2 The result is the bitwise or of 'expr1' and 'expr2'. expr1 ^ expr2 The result is the bitwise xor of 'expr1' and 'expr2'. expr1 & expr2 The result is the bitwise and of 'expr1' and 'expr2'. expr1 == expr2 Compare values. Valid for strings and numbers. expr1 != expr1 Compare values. Valid for strings and numbers. expr1 > expr2 Compare values. Valid for strings and numbers. expr1 >= expr2 Compare values. Valid for strings and numbers. expr1 < expr2 Compare values. Valid for strings and numbers. expr1 <= expr2 Compare values. Valid for strings and numbers. expr1 << expr2 Shift 'expr1' left 'expr2' bits. expr1 >> expr2 Shift 'expr1' right 'expr2' bits. expr1 + expr2 Add 'expr1' and 'expr2'. If numbers, then arithmetic addition is used. If one of the expressions are a string, then that string is concatenated with the other value. You can also add two arrays together which gives an array containing all the elements from both arrays. expr1 - expr2 Subtract 'expr2' from 'expr1'. Valid for numeric values and arrays. In the latter case an array with the elements from the first array where the elements also existing in array 2 has been excluded. expr1 * expr2 Multiply 'expr1' with 'expr2'. expr1 % expr2 The modulo operator of numeric arguments. expr1 / expr2 Integer division. (type)expr This is the type cast operator. 'expr' is converted to the type 'type'. Works on values of the type 'mixed' only. ++ var Increment the value of variable 'var', and return the new value. -- var Decrement the value of variable 'var', and return the new value. - var Compute the negative value of 'var'. ! var Compute the logical 'not' of an integer. ~ var The boolean 'not' of an integer. var++ Increment the value of variable 'var', and return the old value. var-- Decrement the value of variable 'var', and return the old value. expr1[expr2] The array given by 'expr1' is indexed by 'expr2'. expr1->name(...) 'expr1' gives either an object or a string which is converted to an object, and calls the function 'name' in this object.