Prev | Current Page 656 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

In haXe the same can be obtained
using type parameters like or using Dynamic as a catchall solution.
Boolean
(F??“69)
Bool
The allowed values for Boolean are true and false. In haXe Bool is an Enum.
int
(F9)
Int
It is a 32-bit long signed integer. In Neko the Int size has been limited for
performance reasons to 31-bit only. To use 32 bits also in Neko, use the neko.
Int32 type.
Null
(F9)
Not implemented.
Number
(F6??“9)
Float
It is a double precision float number.
Object
(F6??“9)
Dynamic
In AS it is the base type for any Class; this means that any class instance is
automatically of type Object. In haXe this inheritance does not exist but any
instance can be automatically cast to a variable of type Dynamic.
To pass an instance to a generic container, you can do the following:
var p : Dynamic = new Person();
Table continued on following page
Part II: Server Side, JavaScript, and Flash: Oh My!
346
ActionScript Type
(Flash Version) haXe Equivalent
String
(F6??“9)
String
It is a data type to contain text values.


Pages:
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668