B4R Question B4R NumberFormat string buffer overwrite or out-of-bounds? - emexes    
Aug 13, 2019 I used NumberFormat. I have tried this code on two different ESP32 modules:
Private Sub AppStart... 10000
Serial1.Stream.WriteBytes(B1, 0, B1.Length)
Log( NumberFormat...
link: https://www.b4x.com/android/forum/threads/memory-variables-and-objects.65672/#content...
link: It uses the stack buffer for this.
You had me at "stack buffer". Off to read up about tha...
link: Moved to the questions forum.
NumberFormat creates a string. The string must be stored somewhere...
B4A Question NumberFormat Exception but there is no number involved? - Didier9    
Jul 6, 2026 that:
Error occurred on line: 492 (Script)
java.lang.NumberFormatException: For input string: "android.app.AlertDialog@e7cb3ca"
at jdk.internal.math.FloatingDecimal.readJavaFormatString...
link:
Error occurred on line: 492 (Script)
Line 492 is the MsgBox2Async() line
As you writed, the is...
link:
PS: I need to use the Contextal box more :(
172259
That "Copy" is awesome!
It would be...
link:
You should also note that to hide the Negative button you should pass an empty string. An empty str...
B4J Question [BANano] [SOLVED] Incorrect Math / NumberFormat Result - Mashiane    
May 21, 2025 = fullYear - 100
End If
Return NumberFormat(fullYear,4,0) & "-" & NumberFormat(mm,2,0) & "-" & NumberFormat(dd,2,0)
End Sub
This is returning an error when using a 13 digit number "7304150000000", its supposed to be 1973-04-15.
202,473-04-15]...
link: NumberFormat2(fullYear,4,0,0,False) & "-" & NumberFormat2(mm,2,0,0,False) & "-"...
link: Dim currentCentury As Int = (currentYear / 100) * 100
To
Dim currentCentury As Int = Floor(currentYear / 100)
currentCentury = curre...
Bug? [SOLVED] Numberformat Output Wrong Value - rwblinn    
Jun 3, 2025 See Port #3.
Found a possible bug in NumberFormat.
Converting the ULong value 20250531 using NumberFormat(value, 0, 0) results in 20250532 instead 20250531?
So for this specific value 20250531...
link: , every second number is skipped (ie missed).
I imagine it's happening in the B4R NumberFormat...
link: NumberFormat (and some further formatting) from its value received from the HTTP RESTful server, i.e...
link: Thanks = triggered the use of casting.
Have solved by casting first ULong to Long, then use Long to...
Bug? Bug when converting NumberFormat2 to Double - Filippo    
Dec 20, 2024.
Log("NumberFormat2=" & NumberFormat2(-0.0120000000000009, 1, 1, 1, False))
Dim dbl As Double = NumberFormat2(-0.0120000000000009, 1, 1, 1, False)
Log("dbl=" & dbl...
link:
Double numbers cannot 100% represent decimal numbers anyway.
Double numbers cannot 100%...
link: the number - at that point you convert it to a string with NumberFormat.
Double numbers cannot 100%...
link:
What exactly are you trying to do? To round the number?
I only need the number with a maximum...
B4A Question NumberFormat, is this an bug? - Filippo    
Sep 21, 2024("NumberFormat= " & NumberFormat(dNum * 1000, 0, 0))
Log("NumberFormat2= " & NumberFormat2(dNum * 1000, 0, 0, 0, False))
NumberFormat= 1,800
NumberFormat2= 1800
...
link: -advanced-number-formatter.102055/#content
You can define the grouping char here....
link:
Change the NuberFormat2 Boolean parameter (Grouping Used) to 'True' and the result...
link:
The comma is a thousands separator in some locales (UK for example) but I understand some use comma...
B4J Question NumberFormat issue or BUG? - Cableguy    
Mar 16, 2016I have the following code:
mValue = NumberFormat2(TextField1.Text + StepValue, 1, mDecimals, mDecimals, False)
where mValue is Double, StepValue and mDecimals are integers defined in the designer...
Given a mDecimals of value 2, shouldn't this code convert a number like 1.1 to a string like "1.10"??
I ask because all I get is the same decimal places as the mathematical value (i.e 1 + 0.1 = 1.1) , no mater how I format the number
Seems like using NumberFormat on a variable...
B4A Question Rounding Numbers: Round2 or Numberformat2 - Roger Daley    
Nov 11, 2014   
(1 reaction)This is an answer to a question raised in my mind by a comment from Erel, that I should not use Round2 but use Numberformat2 for rounding numbers.
Most of us are taught that for digits below 5, round down, for 5 and greater round up.
IE 4.725 to 2 decimal places gives 4.73. This is the result given by Round2.
Numberformat2 gives the result 4.72 after a bit of research I found... places is 4.72. 4.735 to 2 decimal places is 4.74.
Numberformat2 gives these results.
This link...
B4A Question problem with NumberFormat with Android 11 - Lello1964    
Jun 16, 2021(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
Dim a As Int =12
Log(NumberFormat(a,0,4...
link: , MaximumFractions As Int) As String
Return NumberFormat(Number,Max(MinimumIntegers,1),MaximumFractions)
End...
link: , MaximumFractions As Int) As String
NumberFormat(Number,Max(MinimumIntegers,1),MaximumFractions)
End Sub...
link: Would solve the problem by simply setting the number of digits of integers to 1 rather than 0...
Italian Bug su Andorid 11- numberFormat - Lello1964    
Jun 16, 2021Ho riscontrato un problema serio su Android 11.
Esempio su Android 9
Dim a As Int =0
Log(NumberFormat(a,0,4) )
risultato : 0
su Android 11
risultato .0
un disastro
avete una soluzione...
link: Ti ringrazio infinitamente per l'aiuto.
Senza la tua soluzione sarei in un mare di guai.
Sareb...
link: la punteggiatura italiana....
link: ?...
Page: 1  
2  
3  
4  
5