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