Statalist The Stata Listserver


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

Re: st: looping over parallel lists - is there a alternative to "for"?


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: looping over parallel lists - is there a alternative to "for"?
Date   Thu, 16 Mar 2006 15:14:55 +0100

Nick pointed to a solution to the parallel list problem, and I think we
must accept that most of us have a good chance to live longer than
-for-.

But wouldn't it be nice if -foreach- could:

   foreach A of varlist c1-c10 \ B of numlist 4/2 7/1 {
      do something with `A' and `B'
   }

Svend

__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [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