Lello1964 Well-Known Member Licensed User Longtime User Jun 16, 2021 #1 I have foud this difference between Android 9 and Android 11 I have this code B4X: Dim a As Int =0 Log(NumberFormat(a,0,4) ) Android 9 : result = 0 Android 11 : result = .0 why there is . before 0 ? Someone have some problem, how solve ? other example B4X: Dim a As Int =12 Log(NumberFormat(a,0,4) ) Android 9 : result = 12 Android 11 : result = 12.0 Last edited: Jun 16, 2021
I have foud this difference between Android 9 and Android 11 I have this code B4X: Dim a As Int =0 Log(NumberFormat(a,0,4) ) Android 9 : result = 0 Android 11 : result = .0 why there is . before 0 ? Someone have some problem, how solve ? other example B4X: Dim a As Int =12 Log(NumberFormat(a,0,4) ) Android 9 : result = 12 Android 11 : result = 12.0
Xfood Expert Licensed User Jun 18, 2021 #21 Star-Dust said: Or Alternative B4X: Public Sub NumberFormatPlus(Number As Double, MinimumIntegers As Int, MaximumFractions As Int) As String NumberFormat(Number,Max(MinimumIntegers,1),MaximumFractions) End Sub Click to expand... B4X: Return NumberFormat(Number,Max(MinimumIntegers,1),MaximumFractions) Upvote 0
Star-Dust said: Or Alternative B4X: Public Sub NumberFormatPlus(Number As Double, MinimumIntegers As Int, MaximumFractions As Int) As String NumberFormat(Number,Max(MinimumIntegers,1),MaximumFractions) End Sub Click to expand... B4X: Return NumberFormat(Number,Max(MinimumIntegers,1),MaximumFractions)