M E N U
Content
Introduction
Release Notes
Requirements
Installation
Change Log
Future Plans
Knowledge Base
Referance Manual
Conventions
Templates
Constants
Identifiers
Operators
Expression [( )]
Unary Not [!]
Unary Plus [+]
Unary Minus [-]
Stringizing [#]
Charizing [#@]
1's Complement [~]
Multiplication [*]
Division [/]
Modulus [%]
Addition [+]
Subtraction [-]
Concatenation [##]
Bit Left Shift [<<]
Bit Right Shift [>>]
Bit And [&]
Bit Or [|]
Bit Xor [^]
Less Than [<]
Greater Than [>]
Less Than
Or Equal To [<=]
Greater Than
Or Equal To [>=]
Equal To [==]
Not Equal To [!=]
Logical And [&&]
Logical Or [||]
Logical Xor [^^]
Sequence [,]
Directives
iPP
Legal
Feedback
|
Operators are symbols which represent an operation on an expression.
Syntax
Category |
Operators |
Binary |
expression operator expression |
Arithmetic
|
[ + | - | * | / | % | ## ] |
Bitwise
|
[ << | >> | & | | | ^ ] |
Expression |
[ ( expression ) ] |
Logical
|
[ && | || | ^^ ] |
Relational
|
[ < | > | <= | >= | == | != ] |
Sequence |
[ , ] |
Unary |
[ ! | - | + | ~ | # | #@ ] expression |
Notes
Operators are evaluated by precedence.
Operator |
Description |
Precedence |
Expression |
|
|
( )
|
parentheses expression delimitor |
8 |
Unary |
|
|
!
|
not operator |
7 |
+
|
plus operator |
7 |
-
|
minus operator |
7 |
~
|
one's complement operator |
7 |
#
|
stringizing operator |
7 |
#@
|
charizing operator |
7 |
Binary - Arithmetic |
|
|
*
|
multiplication operator |
6 |
/
|
division operator |
6 |
%
|
modulus operator |
6 |
+
|
addition operator |
6 |
-
|
subtraction operator |
6 |
##
|
concatenation operator |
6 |
Binary - Bitwise |
|
|
<<
|
bit left shift operator |
5 |
>>
|
bit right right operator |
5 |
&
|
bit and operator |
5 |
|
|
bit or operator |
5 |
^
|
bit xor operator |
5 |
Binary - Relational |
|
|
<
|
less than operator |
4 |
>
|
greater than operator |
4 |
<=
|
less than or equal to operator |
4 |
>=
|
greater than or equal to operator |
4 |
==
|
equal to operator |
4 |
!=
|
not equal to operator |
4 |
Binary - Logical |
|
|
&&
|
and operator |
3 |
||
|
or operator |
3 |
^^
|
xor operator |
3 |
Sequence |
|
|
,
|
sequence operator |
1 |
Example
result = 10
x + 5
!doMore
isObject || isConstant
index < length
( offset + 10 ) / 2
max( value1, value2 )
|