Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: change in indexing for stata10


From   Caleb Southworth <caleb@uoregon.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: change in indexing for stata10
Date   Thu, 15 Nov 2007 11:03:44 -0800 (PST)

Was there a change in indexing between Stata 9 & 10?

In Stata 9, this generates a list of ids:

forval i = 1/65 {
	di id[`i']
}

In Stata 10, the same loop on the same data generates no output.

. set trace on

. run "C:\DOCUME~1\cjs\LOCALS~1\Temp\STD05000000.tmp"
- forval i = 1/65 {
- di id[`i']
= di id[1]
- }
- di id[`i']
= di id[2]
- }
- di id[`i']
= di id[3]
- }
[snip]

But

. di id[1]
7

Let me know where I've gone wrong.

Caleb
caleb@uoregon.edu
University of Oregon Sociology
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index