Haxe Numeric Types

The Haxe docs say that Int represents an integral number.

What does that mean? I am guessing it means a 32-bit signed integer? Or perhaps, because of JavaScript’s influence, it means the integral part of an IEEE float-64?

Does Haxe have:

  • longs (64-bit ints)
  • IEEE float-32s
  • unsigned ints and longs
  • array/vector indexes that are longs

thanks

CW

What it is, depends on the platform. See Int.

If you need to be specific, you can use Int32 or Int64.

The Float is IEEE 64bit. Some platforms have other options, such as Float32 for cpp, so you can provide target specific options in your code if you wish.

The same applies to UInt, which has some target specific types available to you.

Have a look through the API:

The upcoming Haxe 5.x is also previewing supporting for the BigInteger type.