1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed @formatnc sometimes mishandles minus sign

Discussion in 'Support' started by Steve Fabian, Mar 19, 2012.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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:
    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.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    It's an RTL bug. I've added a workaround for build 55.
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Thanks for the quick fix!
     

Share This Page