Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: RE: Question about match merge on name (bug in extrname)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: RE: Question about match merge on name (bug in extrname)
Date   Tue, 26 Aug 2003 10:47:30 +0100

Scott Merryman replied to Daniel R Sabath

> > There is a bug in extrname. If the variable _merge exists
> then extrname will
> > fail with a very vague "invalid syntax" error. If you
> have seen this
> > behavior the fix is to either drop or rename the variable
> from "_merge" to
> > "merge".
> >
> > The exact error message is:
> >
> > . extrname name, all
> > ...
> > invalid syntax
> > r(110);
> >
> > I have logged this bug with Stata and am posting with the
> hope that this
> > will keep someone else from wasting 2 hours trying to
> figure out why it
> > fails after a merge but not any other time.
>
> Given that -extrname- is 10 years old, I would expect some
> problems.....
>
> Amusingly, the help file does suggest that you fax problem
> names to William
> Gould at the "Computing Resource Center"

Here "bug" means that the program didn't work the way
you thought it should.

The way that -extrname- works is a feature really, and
it's standard behaviour.

-merge- by default leaves a variable _merge in memory.

As Daniel reports, it will complain if this exists when you try
another -merge-, which is one thing done within -extrname-.

In essence, you are supposed to -drop- _merge or rename it if you want
to keep
the information. This is documented at e.g. [R] -merge-.

As this behaviour is not, apparently, documented for -extrname-
-- but then many programs use -merge- internally and do not document
it --
a fair question would be: what should have been done?

. set trace on

to see where the program failed might have shortened
your debug time.

Nick
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index