Can we have it the "old-school" way (| & ^ >> << ~)?
Take for example this expression:
The B4X equivalent is terribly long:
I'm not even sure if I got it right, such is the reduced readability... 
Can we do something about it?
Many thanks in advance!
PS: It would be nice to have, at least, a parser. Something like this:
Take for example this expression:
B4X:
int rgb = ((r & 0x0ff) << 16) | ((g & 0x0ff) << 8) | (b & 0x0ff);
The B4X equivalent is terribly long:
B4X:
Dim rgb = Bit.Or(Bit.Or(Bit.ShiftLeft(Bit.And(r, 0x0ff), 16), Bit.ShiftLeft(Bit.And(g, 0x0ff), 8)), Bit.And(b, 0x0ff)) As Int
Can we do something about it?
Many thanks in advance!
PS: It would be nice to have, at least, a parser. Something like this:
B4X:
Dim rgb = Bit.ParseString("((r & 0x0ff) << 16) | ((g & 0x0ff) << 8) | (b & 0x0ff)") As Int
Last edited: