schimanski Well-Known Member Licensed User Longtime User Dec 23, 2010 #1 Hello together! Is there something like this under b4A? B4X: bit.DecToBin(X) bit.BinToDec(X) Format(X,"d4") Thanks for answer....
Hello together! Is there something like this under b4A? B4X: bit.DecToBin(X) bit.BinToDec(X) Format(X,"d4") Thanks for answer....
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2010 #2 See Bit.ToBinaryString and ParseInt: Basic4android - Core Upvote 0
schimanski Well-Known Member Licensed User Longtime User Dec 25, 2010 #3 Thanks, Erel! Bit.ToBinaryString and ParseInt runs fine. But I'm looking also for a format- function like Format(X,"d4"). I want to fill a binärcode with additional zeros. For example: '1101' to '00001101' Is that possible? rgds Upvote 0
Thanks, Erel! Bit.ToBinaryString and ParseInt runs fine. But I'm looking also for a format- function like Format(X,"d4"). I want to fill a binärcode with additional zeros. For example: '1101' to '00001101' Is that possible? rgds
schimanski Well-Known Member Licensed User Longtime User Dec 25, 2010 #5 Thanks, agraham!! I tried it with this code: B4X: textbox4.Text=NumberFormat("1", 8 ,0) Must the solution not be '00000001'??? I have '00,000,001' Upvote 0
Thanks, agraham!! I tried it with this code: B4X: textbox4.Text=NumberFormat("1", 8 ,0) Must the solution not be '00000001'??? I have '00,000,001'
schimanski Well-Known Member Licensed User Longtime User Dec 25, 2010 #7 :sign0161: Yes, I'm a little bit blind, today..... Upvote 0