> Benoît Minisini ha scritto: > >> It seems that there are bugs in the "Ror" function too. > >> Using the same number, 197 (11000101), if I write ROR(197,3) I get > >> -1610612712 ( > >> 1111111111111111111111111111111110100000000000000000000000011000) > >> instead of 10111000 (184). > > > > 197 is not a Byte, it is an Integer. If you want a Byte, you have to do > > Shl(CByte(197), 3). > > > > Regards, > > Sorry. > I was thinking that the function would find the type of the data by itself.
How could it know that 197 is a Byte, and not a Short, or an Integer, or a Float... If nothing is specified, the compiler assumes an Integer constant, or a Long if the number is too big, or a Float if it cannot be a Long. Regards, -- Benoît ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user