[haXe] unsigned int!
Nicolas Cannasse
ncannasse at motion-twin.com
Tue Aug 15 20:28:46 CEST 2006
> And what advise would you give me, so i can emulate this behavior on a
> var or class?
> thnks!
>
> Bruno.
Hi,
It depends for what purpose you need unsigned int.
If you want to ensure that the user does not give you a negative value,
then you can check it at runtime, in a property setter for example.
There is no need for unsigned arithmetic, since the runtime
representation of both signed and unsigned ints are the same. Only
comparisons > and < differ, so you might want to write your own
comparison function.
Perhaps you could give more infos about what you're trying to acheive
and why you need unsigned int for that ?
Nicolas
More information about the Haxe
mailing list