Dear All,

I am writing to ask a quick question on making a small adjustment to scalars.

Code:
sysuse auto, clear
gen lprice = log(price)
reg lprice mpg
scalar b = _b[mpg]
display %9.3f scalar(b)
-0.033

local coef: di %9.3f scalar(b)
display `coef'
-.033
As shown in the codes, -local- has dismissed the leading 0, while the original -display- can display the leading 0.

I am wondering how I could have this leading 0 back when I turn the result into local because I would like to use this -local coef- to produce a regression table, which does not look nice if the leading 0 is missing.

Thank you very much and I look forward to hearing from you!

Best regards,
Long