Operators

This chapter contains a description of the operators used in SC. Most of them may be defined for user types.

Priority Operator Description Associativity Overloadable
15.member access through referenceleft to rightno
15->member access through pointerleft to rightno
15[]array element accessleft to rightno
15()function callleft to rightno
15newmanaged memeory allocationleft to rightno
15(T)typecast to type Tright to leftyes
15$rtti (ISCSymbol) accessleft to rightno
15*dereferencing pointerright to leftno
15&address of variableright to leftno
14++postfix incrementleft to rightyes
14++prefix incrementright to leftyes
14--postfix decrementleft to rightyes
14--prefix decrementright to leftyes
14~bitwise negationright to leftyes
14!logical negationright to leftyes
14-unary minusright to leftyes
13*multiplicationleft to rightyes
13/divisionleft to rightyes
13%modulusleft to rightyes
12+additionleft to rightyes
12-subtractionleft to rightyes
11>>bitwise left shiftleft to rightyes
11<<bitwise right shiftleft to rightyes
10<less - comparison operatorleft to rightyes
10<=less or equal - comparison operatorleft to rightyes
10>greater - comparison operatorleft to rightyes
10>=greater or equal - comparison operatorleft to rightyes
9==equal - comparison operatorleft to rightyes
9!=not equal - comparison operatorleft to rightyes
8&bitwise andleft to rightyes
7^bitwise xorleft to rightyes
6|bitwise orleft to rightyes
5&&logical andleft to rightyes
4||logical orleft to rightyes
2=assignmentleft to rightyes
2+=assignment with additionleft to rightno
2-=assignment with subtractionleft to rightno
2*=assignment with multiplicationleft to rightno
2/=assignment with divisionleft to rightno
2%=assignment with modulusleft to rightno
2<<=assignment with bitwise left shiftleft to rightno
2>>=assignment with bitwise left shiftleft to rightno
2&=assignment with bitwise andleft to rightno
2|=assignment with bitwise orleft to rightno
2~=assignment with bitwise negationleft to rightno
1,commaleft to rightno