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

st: Problem with tempvar __000000 (still confused)


From   casta <[email protected]>
To   [email protected]
Subject   st: Problem with tempvar __000000 (still confused)
Date   Thu, 24 Jun 2004 10:50:03 +0200

Date: Tue, 22 Jun 2004 11:40:12 -0400
From: "Renzo Comolli" <[email protected]>
Subject: st: Problem with tempvar __000000 (still confused)

Thanks to both Tom and Nick.

This message shows how to see the error message (part 1) and how this
"feature" can cause -reshape- to fail (part 2)

1. To see the "error" message (which is not a true error message because the
operation is carried on successfully, it is more  a "warning message") do
the following
Step 1: Put the following instructions in a do file
 sysuse auto, clear
 tempvar num_miss
 gen `num_miss'=0
 save debugauto, replace
Step 2: do the do file
Step 3: put the following instructions in the command line
 use debugauto, clear
 twoway (lfit  price  mpg) (scatter  price mpg), by( foreign)

You should now be able to see the "error" message.
Notice also that the __000000 is there when you -use debugauto- but it has
disappeared after -twoway-. This disappearence is probably intentional and
gives no problem to me, but I thought we need to remark on it "for future
generations".


2. Here is how you can cause reshape to fail
Step 1: Put the following instructions in a do file
use http://www.stata-press.com/data/r8/quad1.dta, clear
replace id=_n // this line is not part of the problem, it is there only to
create a suitable dataset
tempvar num_miss
gen `num_miss'=0
save debugreshape, replace

Step 2: do the do file
Step 3: put the following instructions in the command line
use debugreshape, clear
reshape long x, i(id) j(number)

I get
__000000 already defined
variable __000000 not found

Best Regards,
Renzo Comolli

I have 6 programs I used since years and I got also the new error message with "_000000 already exists " and so on. I finally add the following line at the end of the programs which causes "_0000" message :
capt drop _*
The error came only since the new verstion of stata (18/5/04)

CF
*
* 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