Dear Statalist,

I am trying to format the number stored in a local macro using the string(n, s) function. Here is my code:
Code:
version 17.0
quietly: count // Store total no. of pts to scalar

scalar SC_total = r(N)

local ML_total = string(SC_total, "%9.0fc")

display `ML_total'

3 274
The expected output of display command is 3,274; however, it appeared without coma, like this 3 274.

Please help me solve this issue.


Thank you
Abdullah