LoginLogin
Might make SBS readonly: thread

Operator Table

Root / Documentation / [.]

Created:
SyntaxNameDescriptionExample
()ParenthesesGroups sub-expressions (effectively raising their precedence) and surrounds argument lists for function calls.1+(2+3) RND(10)
[]Index ReferenceRefer to an element of an array, or a character of a string, given its index.ARRAY[10]
+AdditionAdd two numbers.1+2
String ConcatenationConcatenate two strings."abc"+"def"
-NegationNegate a number.-10
SubtractionSubtract two numbers.5-2
*MultiplicationMultiply two numbers.5*2
String RepetitionRepeat the contents of a string a given number of times."abc"*3
/DivisionDivide two numbers. Result is a real number.1/2
DIVInteger DivisionTruncating integer division of two numbers. Result is an integer.1 DIV 2
MODInteger ModuloRemainder of truncating integer division. Result is an integer.1 MOD 2
<<Left Bit ShiftLeft shift an integer by n bits.1<<16
<<<1<<<16
<<+Left Bit RotateLeft rotate an integer by n bits. The highest bit is rotated into the lowest bit.1<<+16
>>Signed Right Bit ShiftRight shift an integer by n bits. The sign bit is filled with its previous value (sign extension.)-500>>2
>>>Unsigned Right Bit ShiftRight shift an integer by n bits. The sign bit is filled with zero (zero extension.)-500>>>2
>>+Right Bit RotateRight rotate an integer by n bits. The lowest bit is rotated into the highest bit.1>>+16
ANDBitwise ANDFind the bitwise AND of two integers.16 AND 32
ORBitwise ORFind the bitwise OR of two integers.16 OR 32
XORBitwise XORFind the bitwise exclusive OR of two integers.16 XOR 32
NOTBitwise NOTInvert all bits of an integer.NOT 10
==EqualityTrue if the two values are equal.1==2
!=InequalityTrue if the two values are not equal.1!=2
<Less ThanTrue if the first value is less than the second.1<2
>Greater ThanTrue if the first value is greater than the second.1>2
<=Less Than or EqualTrue if the first value is less than or equal to the second.1<=2
>=Greater Than or EqualTrue if the first value is greater than or equal to the second.1>=2
!Logical NOTInverts the condition (true is false, false is true)!(1<2)
&&Logical ANDTrue if both sides are true. If the left side is false, the right side is not evaluated (short-cutting.)1<2&&3<4
||Logical ANDTrue if either side is true. If the left side is true, the right side is not evaluated (short-cutting.)1<2||3<4

Precedence

The order of operations in an expression is determined by the operator precedence. The first row is highest precedence, and the last row is lowest. Operators on the same row have the same precedence, and they're evaluated by left-to-right order of the expression.
Highest
() []
NOT ! - (Negation)
* / DIV MOD
+ - (Subtraction)
<< <<< <<+ >> >>> >>+
== != < <= > >=
AND
OR XOR
&&
||
Lowest

No posts yet (will you be the first?)