About Operators(中文)

下表按优先级从高到低分组列出了所有 DScript 运算符:

名称 符号 结合性
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 从左到右
Property Function Call Implied Multiply x.y x() ky 从左到右
Range x..y 从左到右
Subscript Value Of Percent x#y ?x x% 从左到右
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 从右到左
Power x^y 从左到右
Multiply Divide Remainder x*y x/y x%y 从左到右
Add Subtract List Concatenate x+y x-y x!!y 从左到右
Left Shift Right Shift Zero-Fill Right Shift x<>y x>>>y 从左到右
Greater than or equal Less Than or Equal Greater than Less Than x>=y x<=y x>y x<y 从左到右
Equal Not Equal x==y x!=y 从左到右
Bitwise And x&y 从左到右
Bitwise Exclusive Or x~y 从左到右
Bitwise Or x y
Logical And x&&y 从左到右
Logical Or x
Conditional x?y:z 从右到左
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 从左到右
Define x:=y 从右到左