Prev | Current Page 669 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

for(i in iter) { /*??¦*/ }
Where iter is an Iterable or Iterator object and i is a local variable
that assumes the value of the current element in the sequence.
Note that there is no need to use the var statement and assign a type
for the variable I in both cases; the variable is automatically generated
and the type is inferred in the loop.
for..in
(F6??“9)
See for and the Reflect description in Chapter 16.
for each..in
(F9)
See for and the Reflect description in Chapter 16.
implements
(F6??“9)
In haXe, a class can implement not only interfaces but also classes. This
feature is not supported in Flash 9.
Statements, Structures, and Keywords
There are many affinities between the general syntax of ActionScript and haXe. Table 12 - 5 explains the
subtle differences and highlights the entries that do not have an equivalent implementation.
Chapter 12: Building Interactive Content with Flash
355
ActionScript Keyword
(Flash Version) haXe Equivalent
intrinsic
(F6??“8)
native
(F9)
Intrinsic in AS2 and native in AS3 have a meaning very similar to extern
in haXe.


Pages:
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681