Weird behavior of NumberFormat function

Vinians2006

Active Member
Licensed User
Longtime User
See :
B4X:
dim str as string
str = "0" 
MsgBox(NumberFormat(str, 4, 0))
The MsgBox shows:
0,00 ?????
Its should be 0000 ...
Whats wrong ? I know that str is a string but B4A convert it on the fly...
 

Vinians2006

Active Member
Licensed User
Longtime User
NumberFormat transforms a NUMBER to a STRING not a String to a String.

Best regards.
I know but since NumberFormat requires a integer Basic4A transform it on the fly. Its only a snippet of code, after you help me on another thread I used NumberFormat several times only in this line the result is wrong...
 
Upvote 0
Top