Fixed @formatnc sometimes mishandles minus sign

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
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:
for %x in (-1 -10 -100 -1000 -10000 -100000 -1000000 -10000000) echo %@formatnc[14.2,%x]
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.