I have had the same issue numerous times, the B4A notation is making simple expressions really convoluted, and unreadable. I wish the standard C notation was implemented since most other languages follow it.
Try to write this in B4A please and you will understand:
int binary = ((hash[offset] & 0x7f) << 24) | ((hash[offset + 1] & 0xff) << 16) | ((hash[offset + 2] & 0xff) << 8) | (hash[offset + 3] & 0xff);
It's from our soon to be released MTEEVAL library (w/ full source).
MTEEVAL implements a stack based expression compiler. Modifying the source you can support any expression your project needs like the hypothetical bitwise op example above.
Wow!! So did you use B4A to create a virtual machine that runs on the Dalvik virtual machine, which in turn, can also run in my Android virtual machine on my real x86 machine PC????
@Erel, will you take this request into consideration? Using Bit.Something() is fine for simple operations, but when you need to read "a few" bits and combine "a few" bytes, it becomes a nightmare, in terms of readability.
Thank you!
I'm not asking for a replacement, only for an alternative syntax... This way, I believe beginners and experts would be both happy.
Regarding the "&" operator, hopefully it can be segregated into bitwise or string concatenation, depending on context, something like:
If betweenStrings or betweenChars Then IsConcatenator = TRUE