iOS Question Clarification of NumberFormat2

ciginfo

Well-Known Member
Licensed User
Longtime User
1 °) Can you precise me if NumberFormat2 rounds to a string or to a number (int, double etc.)

2°) I don't understand what mean different elements in NumberFormat2, can you explain me.
MyNumber = NumberFormat2(MyNumber, 0,3,2, True)
- 0 -> ?
- 3 -> ?
- 2 -> ?
- True -> ?

Thank you
 

ciginfo

Well-Known Member
Licensed User
Longtime User
Hello,
I still do not understand NumberFormat 2. What is "Grouping Used"
I have 3800,236589... I want to display 3800, how can I do?
B4X:
MyNumber = 3800,236589....
MyNumber = NumberFormat2(MyNumber, ?,?,?, ?)
Thank you
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
GroupingUsed = True
12,123,456.123123 (this equivalent to 12'123'456,123123 in european notation)
GroupingUsed = False
12123456.123123

The decimal character in B4A is . and not , !

3800.236589 > 3800
NyNumber = 3800.236589
NumberFormat2(MyNumber, 1, 0, 0, False)
1 > at least one interger
0 > fractions
0 > fractions
False > no grouping
 
Upvote 0
Top