[Gambas-user] Unsigned int
Benoit Minisini
gambas at ...1...
Sun Jul 23 11:16:00 CEST 2006
On Thursday 20 July 2006 17:11, Leonardo Miliani wrote:
> Hi Benoit,
> do you think to inplement the "unsigned int" data type in Gambas, as is
> in C language?
> It could be useful in a lot of cases, i.e. when working on real 32 bit
> words is needed.
There won't be any "unsigned" type in 2.0. Maybe in 3.0 ? :-)
Logically, you can use Integer to work as if it was unsigned in almost any
case. Arithmetic is the same, and shift instructions have signed and unsigned
variants (Asr/Lsr, Asl/Lsl). Like in assembler!
The only problem is when you want to print them. You can use Long datatype as
a workaround to do that. But then you will want unsigned Long, won't you?
Regards,
--
Benoit Minisini
More information about the User
mailing list