Announcement

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

  • strofreal(): misleading documentation

    The help file for strofreal() states that:
    strofreal(R, format) returns "." if format is invalid.
    Yet, in Stata 16.1 to 18 I get:
    Code:
    . mata : strofreal(42,"invalid") == "."
      0
    
    . mata : strofreal(42,"invalid") == ""
      1
    that is, strofreal(42,"invalid") returns the empty string "", not "." as stated in the help file. Is this still the case for Stata 18.5 or higher? If so, could the documentation be changed to make the actual behavior clearer?

  • #2
    The behavior is correct, in Stata, the string missing value is "", i.e., empty string. We will change documentation to match.

    Comment

    Working...
    X