About Operators
The following table presents all DScript operators in groups from highest to lowest precedence:
| Name | Symbol | Associativity |
|---|---|---|
| Procedure Parentheses List Literal List Element Time Value Quote Plus Minus Do Primitive | {x,y,...} (x,y,...) [x,y,...] x[y] x{y} "x", 'x' +x -x @x | Left to Right |
| Property Function Call Implied Multiply | x.y x() ky | Left to Right |
| Range | x..y | Left to Right |
| Subscript Value Of Percent | x#y ?x x% | Left to Right |
| Increment Decrement Bitwise Not Logical Not Factorial delete new typeof void | x++, ++x x--, --x ~x !x x! delete x.y new x() typeof x void x | Right to Left |
| Power | x^y | Left to Right |
| Multiply Divide Remainder | x*y x/y x%y | Left to Right |
| Add Subtract List Concatenate | x+y x-y x!!y | Left to Right |
| Left Shift Right Shift Zero-Fill Right Shift | x< |
Left to Right |
| Greater than or equal Less Than or Equal Greater than Less Than | x>=y x<=y x>y x<y | Left to Right |
| Equal Not Equal | x==y x!=y | Left to Right |
| Bitwise And | x&y | Left to Right |
| Bitwise Exclusive Or | x~y | Left to Right |
| Bitwise Or | x | y |
| Logical And | x&&y | Left to Right |
| Logical Or | x | |
| Conditional | x?y:z | Right to Left |
| Assign Compound Assignment | x=y x^=y x*=y x/=y x%=y x+=y x-=y x<<=y x>>=y x>>>=y x&=y x~=y x | =y x!!=y |
| Object Literal | {p1:x,p2:y,...} | |
| Accumulate Time Assignment | x->y x?=y | Left to Right |
| Define | x:=y | Right to Left |