paravantis
29-08-2024, 18:21
Is there an easier way to separate thousands with comma?
Uses "Console"
PrintL format$(123456789.123,"###,###,###.###")
WaitKey
In the code above, we would have to know beforehand how large the value to be printed is, and the code would fail to place all the commas if the value were larger.
We could use
PrintL format$(123456789.123,"###,###,###,###,###,###,###,###.###")
to anticipate larger values, but I wonder if there is a more elegant solution.
Uses "Console"
PrintL format$(123456789.123,"###,###,###.###")
WaitKey
In the code above, we would have to know beforehand how large the value to be printed is, and the code would fail to place all the commas if the value were larger.
We could use
PrintL format$(123456789.123,"###,###,###,###,###,###,###,###.###")
to anticipate larger values, but I wonder if there is a more elegant solution.