Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Decimal separator in string()

    I've noticed that the string() function and it's strofreal() counterpart are ignoring the default decimal separator setting in Stata 13.0/Windows. I wonder if this was intended or is a bug?

    Code:
    clear all
    version 13.0
    set dp comma
    display c(version_rng)
    display 2/3
    display string(2/3)
    mata 2/3
    mata strofreal(2/3)
    display string(2/3, "%9,7f")
    Specifying the comma decimal format explicitly helps in the case of string() and strofreal().
    Is there a similar workaround for real() and strtoreal()?
Working...
X