Announcement

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

  • Bug (?) in merge.ado

    Lines 77 through 82 of merge.ado check that gen and nogen are not specified together.

    Code:
    if ("`nogenerate'"!="") {
        di as smcl err "{p}"
        di as smcl "options -generate()- and -nogenerate-"
        di as smcl "may not be specified together."
        di as smcl err "{p_end}"
    }
    This code has a typo. "di as smcl err" gives

    Code:
    . di as smcl err   
    err not found
    r(111);
    The correct syntax is "di as smcl as err". However, in that case you'd get the error message but the program would not exit? Not really sure where else to ask about it.

  • #2
    Two things come to mind, as my copy of Stata is not at hand. First, many official ado commands are written under version control of older versions of Stata, and so the syntax may be different. This might be one of those circumstances, so you’ll need to look at the top of the ado file for a -version- statement. Second, you could easily test this by specifying the two contradictory options together in a merge statement. If you see the above message in red, you’ll know it worked just fine.

    Comment


    • #3
      Leonardo Guizzetti From Stata 18, version 3.2.13 12sep2023.

      The problem is not whether it gives an error: It does, but the error is unintentional, because it's a syntax error with "display" instead of the intended message which is to explain the two options are not allowed to be specified together.

      Comment


      • #4
        Hi Mauricio, I was able to check with the latest release of Stata 18 (04sep2024) and can confirm this is a bug. I was mistakenly assuming this might have been a difference in -display- syntax.

        You can report this to Stata Technical Services.

        Comment

        Working...
        X