- May
- 3,515
- 5
When the number of digits in the integer part of a negative number is a multiple of 3 a thousands separator is inserted between the minus sign and the most significant digit:
generates
Note: the problem exists in all versions of TCC (but not 4NT which did not have this function). I had used my own function combining @formatn and @comma to achieve the same formatting since V7 and have not switched to @formatnc until recently, hence the delay in detecting the problem.
Code:
for %x in (-1 -10 -100 -1000 -10000 -100000 -1000000 -10000000) echo %@formatnc[14.2,%x]
generates
Code:
-1.00
-10.00
-,100.00
-1,000.00
-10,000.00
-,100,000.00
-1,000,000.00
-10,000,000.00
Note: the problem exists in all versions of TCC (but not 4NT which did not have this function). I had used my own function combining @formatn and @comma to achieve the same formatting since V7 and have not switched to @formatnc until recently, hence the delay in detecting the problem.