S sorex Expert Licensed User Longtime User Feb 11, 2016 #1 Hello, Is there a way to define a binary based value? When working with bit patterns it's easier to use something like a=&b101 instead of a=5 but I tried 0b101 & 101b which were common but none of them seem to work.
Hello, Is there a way to define a binary based value? When working with bit patterns it's easier to use something like a=&b101 instead of a=5 but I tried 0b101 & 101b which were common but none of them seem to work.
Erel B4X founder Staff member Licensed User Longtime User Feb 11, 2016 #2 You can only write hex numbers with 0x. However you can: B4X: Dim a As Int = Bit.ParseInt("101", 2) Upvote 0
S sorex Expert Licensed User Longtime User Feb 11, 2016 #3 that's a pity, most languages seem to have this (exept VB6 it seems). I was using the int work-a-round which works fine ofcourse. Upvote 0
that's a pity, most languages seem to have this (exept VB6 it seems). I was using the int work-a-round which works fine ofcourse.