The haXe standard library contains a large
number of methods that can provide manipulative functionality on basic types, and you will be covering
many of these over the next few pages.
Operators
Before you delve into the haXe standard library, it is important that you understand the use of operators.
You will not cover the use of operators with too much depth as prior knowledge of their use is a
prerequisite for this book. However, many of you reading this book may very well come from an HTML
or Flash development background, and so you may not have a complete understanding of all the
available operators at your disposal. Therefore, there is an attempt to summarize their usage, though
those of you already very familiar with operator usage in languages such as C++, Java, JavaScript, or
ActionScript, please feel free to skip ahead.
Table 3 - 8 provides an overview of the operators usable in the haXe language.
Table 3-8
Operator Associative Direction Description
() Left to right Grouping operators
! Right to left Negation
++ Left to right Increment
-- Left to right Decrement
* Left to right Multiplication
/ Left to right Division
% Left to right Modulo
+ Left to right Addition
- Left to right Subtraction
<< Right to left Left shift
>> Right to left Right shift
< Left to right Less than
<= Left to right Less than or equal to
> Left to right Greater than
>= Left to right Greater than or equal to
Table continued on following page
Part I: The Core Language
56
Operator Associative Direction Description
== Left to right Equality
!= Left to right Inequality
& Left to right Bitwise AND
| Left to right Bitwise OR
^ Left to right Bitwise XOR
&& Left to right Logical AND
|| Left to right Logical OR
= *= /= %= += -= &= ^= |=
<<= >>=
Right to left Assignment operators
These operators have been put into the order of precedence with the higher precedence operators
starting at the top of the list.
Pages:
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144